aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2024-02-12 21:34:29 -0600
committerDenis Kenzior <denkenz@gmail.com>2024-02-12 21:36:30 -0600
commit085637842bf120f30e145501d2d85420724059b3 (patch)
tree7603de08d790c0d93563ff387ddea4c73498758f
parent1d7f24b5c15d4ff6fb73a0843121457c23b1eb4f (diff)
downloadofono-085637842bf120f30e145501d2d85420724059b3.tar.gz
sim: Drop glib use from sim_efli_format
Change the return signature to use bool instead of gboolean. Also, change g_ascii_isalpha use to l_ascii_isalpha. While here, also update array subscripts to follow the coding style, item M3
-rw-r--r--src/sim.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/sim.c b/src/sim.c
index 33d00ac9a..55ff5f448 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -2155,15 +2155,15 @@ static void sim_efli_read_cb(int ok, int length, int record,
}
/* Detect whether the file is in EFli format, as opposed to 51.011 EFlp */
-static gboolean sim_efli_format(const unsigned char *ef, int length)
+static bool sim_efli_format(const unsigned char *ef, int length)
{
int i;
if (length & 1)
- return FALSE;
+ return false;
for (i = 0; i < length; i += 2) {
- if (ef[i] == 0xff && ef[i+1] == 0xff)
+ if (ef[i] == 0xff && ef[i + 1] == 0xff)
continue;
/*
@@ -2171,14 +2171,14 @@ static gboolean sim_efli_format(const unsigned char *ef, int length)
* characters while CB DCS language codes are in ranges
* (0 - 15) or (32 - 47), so the ranges don't overlap
*/
- if (g_ascii_isalpha(ef[i]) == 0)
- return FALSE;
+ if (l_ascii_isalpha(ef[i]) == 0)
+ return false;
- if (g_ascii_isalpha(ef[i+1]) == 0)
- return FALSE;
+ if (l_ascii_isalpha(ef[i + 1]) == 0)
+ return false;
}
- return TRUE;
+ return true;
}
static GSList *parse_language_list(const unsigned char *ef, int length)
@@ -2261,7 +2261,7 @@ static void sim_efpl_read_cb(int ok, int length, int record,
struct ofono_sim *sim = userdata;
const char *path = __ofono_atom_get_path(sim->atom);
DBusConnection *conn = ofono_dbus_get_connection();
- gboolean efli_format = TRUE;
+ bool efli_format = true;
GSList *efli = NULL;
GSList *efpl = NULL;