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)
|
||||
return NULL;
|
||||
len = (u16_strlen(src) + 1) * sizeof(u16);
|
||||
len = u16_strsize(src);
|
||||
new = malloc(len);
|
||||
if (!new)
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user