mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-01 08:59:33 +00:00
lib: simplify u16_strdup()
Use u16_strsize() instead of duplicating it. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
0121282d1a
commit
967407defe
1 changed files with 1 additions and 1 deletions
|
@ -407,7 +407,7 @@ u16 *u16_strdup(const void *src)
|
|||
|
||||
if (!src)
|
||||
return NULL;
|
||||
len = (u16_strlen(src) + 1) * sizeof(u16);
|
||||
len = u16_strsize(src);
|
||||
new = malloc(len);
|
||||
if (!new)
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue