From: Denis Kenzior <denkenz@gmail.com>
To: ofono@lists.linux.dev
Cc: Denis Kenzior <denkenz@gmail.com>
Subject: [PATCH 2/6] core: Remove g_utf8_strlen use
Date: Mon, 5 Feb 2024 15:31:23 -0600 [thread overview]
Message-ID: <20240205213150.1001245-2-denkenz@gmail.com> (raw)
In-Reply-To: <20240205213150.1001245-1-denkenz@gmail.com>
Replace with l_utf8_strlen
---
src/smsutil.c | 2 +-
src/stkagent.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/smsutil.c b/src/smsutil.c
index d07960190103..f46507f00e1c 100644
--- a/src/smsutil.c
+++ b/src/smsutil.c
@@ -549,7 +549,7 @@ gboolean sms_encode_address_field(const struct sms_address *in, gboolean sc,
unsigned char *r;
/* TP-OA's 10 octets transport 11 8-bit chars */
- if (g_utf8_strlen(addr, strlen(addr)) > 11)
+ if (l_utf8_strlen(addr) > 11)
return FALSE;
gsm = convert_utf8_to_gsm(in->address, len, NULL, &written, 0);
diff --git a/src/stkagent.c b/src/stkagent.c
index 6c1f6d57093f..8748ec63022c 100644
--- a/src/stkagent.c
+++ b/src/stkagent.c
@@ -838,7 +838,7 @@ static void get_input_cb(DBusPendingCall *call, void *data)
goto error;
}
- len = g_utf8_strlen(string, -1);
+ len = l_utf8_strlen(string);
if (len < agent->min_length || len > agent->max_length) {
ofono_error("Length not acceptable");
--
2.43.0
next prev parent reply other threads:[~2024-02-05 21:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 21:31 [PATCH 1/6] stkagent: Use l_utf8_get_codepoint Denis Kenzior
2024-02-05 21:31 ` Denis Kenzior [this message]
2024-02-05 21:31 ` [PATCH 3/6] unit: Remove g_utf8_strlen use Denis Kenzior
2024-02-05 21:31 ` [PATCH 4/6] qmimodem: Drop use of g_utf8_validate Denis Kenzior
2024-02-05 21:31 ` [PATCH 5/6] simutil: Drop use of g_utf8_validate_len Denis Kenzior
2024-02-05 21:31 ` [PATCH 6/6] unit: Update to the new API Denis Kenzior
2024-02-06 16:30 ` [PATCH 1/6] stkagent: Use l_utf8_get_codepoint patchwork-bot+ofono
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240205213150.1001245-2-denkenz@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox