commit | 967407defe8b79bd464984801614373f4ab2f6f9 | [log] [tgz] |
---|---|---|
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | Sat Apr 02 11:46:59 2022 +0200 |
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | Fri Apr 15 11:26:20 2022 +0200 |
tree | a5bf9f536b17e51d359d391c75d5a9fafb74f8f8 | |
parent | 0121282d1aa449a037445a212e4fac53e2164893 [diff] [blame] |
lib: simplify u16_strdup() Use u16_strsize() instead of duplicating it. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
diff --git a/lib/charset.c b/lib/charset.c index 91cbe87..de201cf 100644 --- a/lib/charset.c +++ b/lib/charset.c
@@ -407,7 +407,7 @@ if (!src) return NULL; - len = (u16_strlen(src) + 1) * sizeof(u16); + len = u16_strsize(src); new = malloc(len); if (!new) return NULL;