cw_kvstore_add works now
fixed a bug in mavl_add FossilOrigin-Name: 4b040305182ef40f6f053fe1d84ea15f533e931c9d665b513b9a644592519f3e
This commit is contained in:
10
src/cw/cw_strdup.c
Normal file
10
src/cw/cw_strdup.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
char *cw_strdup(const char *s) {
|
||||
size_t size = strlen(s) + 1;
|
||||
char *p = malloc(size);
|
||||
if (p)
|
||||
memcpy(p, s, size);
|
||||
return p;
|
||||
}
|
Reference in New Issue
Block a user