From: Denis Kenzior <denkenz@gmail.com>
To: ofono@lists.linux.dev
Cc: Denis Kenzior <denkenz@gmail.com>
Subject: [PATCH 3/6] unit: Remove g_utf8_strlen use
Date: Mon, 5 Feb 2024 15:31:24 -0600 [thread overview]
Message-ID: <20240205213150.1001245-3-denkenz@gmail.com> (raw)
In-Reply-To: <20240205213150.1001245-1-denkenz@gmail.com>
Replace with l_utf8_strlen
---
unit/test-sms.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/unit/test-sms.c b/unit/test-sms.c
index 3bc099bcbdeb..154bb33ed244 100644
--- a/unit/test-sms.c
+++ b/unit/test-sms.c
@@ -1249,7 +1249,7 @@ static void test_prepare_concat(gconstpointer data)
sms_assembly_free(assembly);
}
-static void test_limit(gunichar uni, int target_size, gboolean use_16bit)
+static void test_limit(gunichar uni, size_t target_size, gboolean use_16bit)
{
char *utf8;
char *decoded;
@@ -1273,7 +1273,7 @@ static void test_limit(gunichar uni, int target_size, gboolean use_16bit)
g_assert(g_slist_length(l) == 255);
decoded = sms_decode_text(l);
- g_assert(g_utf8_strlen(decoded, -1) == target_size);
+ g_assert(l_utf8_strlen(decoded) == target_size);
g_free(decoded);
g_slist_free_full(l, g_free);
--
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 ` [PATCH 2/6] core: Remove g_utf8_strlen use Denis Kenzior
2024-02-05 21:31 ` Denis Kenzior [this message]
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-3-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