mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
eficonfig: use u16_strsize() to get u16 string buffer size
Use u16_strsize() to simplify the u16 string buffer size calculation. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
c67d3c9e23
commit
78b1ccc430
1 changed files with 1 additions and 2 deletions
|
@ -452,8 +452,7 @@ struct efi_device_path *eficonfig_create_device_path(struct efi_device_path *dp_
|
|||
struct efi_device_path *dp;
|
||||
struct efi_device_path_file_path *fp;
|
||||
|
||||
fp_size = sizeof(struct efi_device_path) +
|
||||
((u16_strlen(current_path) + 1) * sizeof(u16));
|
||||
fp_size = sizeof(struct efi_device_path) + u16_strsize(current_path);
|
||||
buf = calloc(1, fp_size + sizeof(END));
|
||||
if (!buf)
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue