summaryrefslogtreecommitdiff
path: root/lib/vsprintf.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2018-08-31 21:31:26 +0200
committerAlexander Graf <agraf@suse.de>2018-09-23 21:55:29 +0200
commit1dde0d57a5d1281aaa949e9bf7b5c476345a56ee (patch)
treed3d429da4ee0d2fc08a040ef4ca556d247907a07 /lib/vsprintf.c
parentfbb3ea806f62b7e27bbae86c42d8f73f05de4bd7 (diff)
efi_loader: rename utf16_strlen, utf16_strnlen
The function names utf16_strlen() and utf16_strnlen() are misnomers. The functions do not count utf-16 characters but non-zero words. So let's rename them to u16_strlen and u16_strnlen(). In utf16_dup() avoid assignment in if clause. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r--lib/vsprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 632796f864..5abf734750 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -280,7 +280,7 @@ static char *string16(char *buf, char *end, u16 *s, int field_width,
int precision, int flags)
{
u16 *str = s ? s : L"<NULL>";
- int utf16_len = utf16_strnlen(str, precision);
+ int utf16_len = u16_strnlen(str, precision);
u8 utf8[utf16_len * MAX_UTF8_PER_UTF16];
int utf8_len, i;