Update SDS to latest version.

This commit is contained in:
antirez 2020-04-16 16:08:37 +02:00
parent c9388ecc73
commit 37b135a400

View File

@ -97,11 +97,11 @@ sds sdsnewlen(const void *init, size_t initlen) {
unsigned char *fp; /* flags pointer. */ unsigned char *fp; /* flags pointer. */
sh = s_malloc(hdrlen+initlen+1); sh = s_malloc(hdrlen+initlen+1);
if (sh == NULL) return NULL;
if (init==SDS_NOINIT) if (init==SDS_NOINIT)
init = NULL; init = NULL;
else if (!init) else if (!init)
memset(sh, 0, hdrlen+initlen+1); memset(sh, 0, hdrlen+initlen+1);
if (sh == NULL) return NULL;
s = (char*)sh+hdrlen; s = (char*)sh+hdrlen;
fp = ((unsigned char*)s)-1; fp = ((unsigned char*)s)-1;
switch(type) { switch(type) {