Make up the fogotten return for xy_strdup()

This commit is contained in:
Aoran Zeng 2023-09-06 16:56:38 +08:00
parent 6cd3b65425
commit 6bec4937ec

3
xy.h
View File

@ -3,7 +3,7 @@
* License : MIT * License : MIT
* Authors : Aoran Zeng <ccmywish@qq.com> * Authors : Aoran Zeng <ccmywish@qq.com>
* Created on : <2023-08-28> * Created on : <2023-08-28>
* Last modified : <2023-09-05> * Last modified : <2023-09-06>
* *
* xy: * xy:
* *
@ -239,6 +239,7 @@ xy_strdup(const char* str)
size_t len = strlen(str); size_t len = strlen(str);
char* new = xy_malloc0(len+1); char* new = xy_malloc0(len+1);
strcpy(new, str); strcpy(new, str);
return new;
} }