diff mbox series

[1/6] sim: Drop glib use from sim_efli_format

Message ID 20240213153524.1085649-1-denkenz@gmail.com (mailing list archive)
State Accepted
Commit 085637842bf120f30e145501d2d85420724059b3
Headers show
Series [1/6] sim: Drop glib use from sim_efli_format | expand

Commit Message

Denis Kenzior Feb. 13, 2024, 3:35 p.m. UTC
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
---
 src/sim.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

patchwork-bot+ofono@kernel.org Feb. 14, 2024, 4:20 p.m. UTC | #1
Hello:

This series was applied to ofono.git (master)
by Denis Kenzior <denkenz@gmail.com>:

On Tue, 13 Feb 2024 09:35:05 -0600 you wrote:
> 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
> ---
>  src/sim.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)

Here is the summary with links:
  - [1/6] sim: Drop glib use from sim_efli_format
    https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=085637842bf1
  - [2/6] smsutil: Move iso639_2_from_language to util
    https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=f7fc3fb342e7
  - [3/6] sim: Move EFli and EFlp parsers to simutil
    https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=dcc67adb9a01
  - [4/6] unit: Add unit tests for language list parsers
    https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=43989a59566a
  - [5/6] common: Convert use of g_ascii* to ell
    https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=ad10d7b0189c
  - [6/6] voicecall: Convert use of g_ascii* to ell
    https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=a1e492c39bae

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/sim.c b/src/sim.c
index 33d00ac9a615..55ff5f448647 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;