efi_loader: simplify efi_serialize_load_option()
Use u16_strsize(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
b27d8e4037
commit
8bf5f9af3b
@ -113,7 +113,7 @@ unsigned long efi_serialize_load_option(struct efi_load_option *lo, u8 **data)
|
||||
unsigned long size;
|
||||
u8 *p;
|
||||
|
||||
label_len = (u16_strlen(lo->label) + 1) * sizeof(u16);
|
||||
label_len = u16_strsize(lo->label);
|
||||
|
||||
/* total size */
|
||||
size = sizeof(lo->attributes);
|
||||
|
Loading…
Reference in New Issue
Block a user