mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Update SDS to latest version.
This commit is contained in:
parent
c9388ecc73
commit
37b135a400
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user