mirror of
https://github.com/RubyMetric/chsrc
synced 2025-06-09 04:16:21 +08:00
Make up the fogotten return for xy_strdup()
This commit is contained in:
parent
6cd3b65425
commit
6bec4937ec
3
xy.h
3
xy.h
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user