diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-04-02 11:46:58 +0200 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-04-15 11:26:20 +0200 |
commit | 0121282d1aa449a037445a212e4fac53e2164893 (patch) | |
tree | 0ba072fadaffa94a75b6a4d85ead358c6823fd16 /lib | |
parent | fe869e11c71a9a7e8f069426c594556aa3181507 (diff) | |
download | u-boot-0121282d1aa449a037445a212e4fac53e2164893.zip u-boot-0121282d1aa449a037445a212e4fac53e2164893.tar.gz u-boot-0121282d1aa449a037445a212e4fac53e2164893.tar.bz2 |
lib: convert u16_strlen() into a macro
The function u16_strlen() can be implemented as call to u16_strnlen().
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/charset.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/charset.c b/lib/charset.c index f44c58d..91cbe87 100644 --- a/lib/charset.c +++ b/lib/charset.c @@ -375,18 +375,6 @@ int u16_strncmp(const u16 *s1, const u16 *s2, size_t n) return ret; } -size_t u16_strlen(const void *in) -{ - const char *pos = in; - size_t ret; - - for (; pos[0] || pos[1]; pos += 2) - ; - ret = pos - (char *)in; - ret >>= 1; - return ret; -} - size_t __efi_runtime u16_strnlen(const u16 *in, size_t count) { size_t i; |