mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 12:56:00 +01: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
@ -407,7 +407,7 @@ u16 *u16_strdup(const void *src)
|
|||||||
|
|
||||||
if (!src)
|
if (!src)
|
||||||
return NULL;
|
return NULL;
|
||||||
len = (u16_strlen(src) + 1) * sizeof(u16);
|
len = u16_strsize(src);
|
||||||
new = malloc(len);
|
new = malloc(len);
|
||||||
if (!new)
|
if (!new)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user