mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
parent
81d5f05b6e
commit
bf92000e2d
@ -556,14 +556,14 @@ static int _hashZiplistEntryValidation(unsigned char *p, void *userdata) {
|
||||
dict *fields;
|
||||
} *data = userdata;
|
||||
|
||||
/* Odd records are field names, add to dict and check that's not a dup */
|
||||
/* Even records are field names, add to dict and check that's not a dup */
|
||||
if (((data->count) & 1) == 0) {
|
||||
unsigned char *str;
|
||||
unsigned int slen;
|
||||
long long vll;
|
||||
if (!ziplistGet(p, &str, &slen, &vll))
|
||||
return 0;
|
||||
sds field = str? sdsnewlen(str, slen): sdsfromlonglong(vll);;
|
||||
sds field = str? sdsnewlen(str, slen): sdsfromlonglong(vll);
|
||||
if (dictAdd(data->fields, field, NULL) != DICT_OK) {
|
||||
/* Duplicate, return an error */
|
||||
sdsfree(field);
|
||||
|
@ -1624,7 +1624,7 @@ static int _zsetZiplistValidateIntegrity(unsigned char *p, void *userdata) {
|
||||
long long vll;
|
||||
if (!ziplistGet(p, &str, &slen, &vll))
|
||||
return 0;
|
||||
sds field = str? sdsnewlen(str, slen): sdsfromlonglong(vll);;
|
||||
sds field = str? sdsnewlen(str, slen): sdsfromlonglong(vll);
|
||||
if (dictAdd(data->fields, field, NULL) != DICT_OK) {
|
||||
/* Duplicate, return an error */
|
||||
sdsfree(field);
|
||||
|
Loading…
Reference in New Issue
Block a user