mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
efi_loader: use u16_strlen() in efi_var_mem_ins()
Don't duplicate library functionality. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
77bb14758d
commit
f557cf08b9
1 changed files with 1 additions and 3 deletions
|
@ -146,9 +146,7 @@ efi_status_t __efi_runtime efi_var_mem_ins(
|
||||||
|
|
||||||
var = (struct efi_var_entry *)
|
var = (struct efi_var_entry *)
|
||||||
((uintptr_t)efi_var_buf + efi_var_buf->length);
|
((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 = u16_strlen(variable_name) + 1;
|
||||||
;
|
|
||||||
++var_name_len;
|
|
||||||
data = var->name + var_name_len;
|
data = var->name + var_name_len;
|
||||||
|
|
||||||
if ((uintptr_t)data - (uintptr_t)efi_var_buf + size1 + size2 >
|
if ((uintptr_t)data - (uintptr_t)efi_var_buf + size1 + size2 >
|
||||||
|
|
Loading…
Reference in a new issue