diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-12-29 10:50:54 +0100 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-12-29 12:52:39 +0100 |
commit | f557cf08b974c359ad3c53a87297d19fe13ff4f0 (patch) | |
tree | 7c7baabe31b40761e7883e4ba899106e7da51795 /lib/efi_loader | |
parent | 77bb14758dcb1876c7bbfa4cead67c90f2d86a44 (diff) | |
download | u-boot-f557cf08b974c359ad3c53a87297d19fe13ff4f0.tar.gz |
efi_loader: use u16_strlen() in efi_var_mem_ins()
Don't duplicate library functionality.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'lib/efi_loader')
-rw-r--r-- | lib/efi_loader/efi_var_mem.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/efi_loader/efi_var_mem.c b/lib/efi_loader/efi_var_mem.c index 0bac594e00..e1058e3c6a 100644 --- a/lib/efi_loader/efi_var_mem.c +++ b/lib/efi_loader/efi_var_mem.c @@ -146,9 +146,7 @@ efi_status_t __efi_runtime efi_var_mem_ins( var = (struct efi_var_entry *) ((uintptr_t)efi_var_buf + efi_var_buf->length); - for (var_name_len = 0; variable_name[var_name_len]; ++var_name_len) - ; - ++var_name_len; + var_name_len = u16_strlen(variable_name) + 1; data = var->name + var_name_len; if ((uintptr_t)data - (uintptr_t)efi_var_buf + size1 + size2 > |