From 1dde0d57a5d1281aaa949e9bf7b5c476345a56ee Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 31 Aug 2018 21:31:26 +0200 Subject: 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 Signed-off-by: Alexander Graf --- lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/vsprintf.c') diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 632796f..5abf734 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""; - 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; -- cgit v1.1