Skip to content

Commit

Permalink
lib: simplify u16_strdup()
Browse files Browse the repository at this point in the history
Use u16_strsize() instead of duplicating it.

Signed-off-by: Heinrich Schuchardt <[email protected]>
  • Loading branch information
xypron committed Apr 15, 2022
1 parent 0121282 commit 967407d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/charset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 967407d

Please sign in to comment.