cw_kvstore_add works now

fixed a bug in mavl_add

FossilOrigin-Name: 4b040305182ef40f6f053fe1d84ea15f533e931c9d665b513b9a644592519f3e
This commit is contained in:
7u83@mail.ru
2018-03-07 09:30:40 +00:00
parent 2055a0d644
commit c93867811a
13 changed files with 108 additions and 38 deletions

10
src/cw/cw_strdup.c Normal file
View 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;
}