Remove dead variable bothsds from object.c.
Thanks to @run and @badboy for spotting this. Triva: clang was not able to provide me a warning about that when compiling. This closes #1024 and #1207, committing the change myself as the pull requests no longer apply cleanly after other changes to the same function.
This commit is contained in:
parent
320fa02b9b
commit
bf56948fd0
@ -418,7 +418,6 @@ int compareStringObjectsWithFlags(robj *a, robj *b, int flags) {
|
|||||||
redisAssertWithInfo(NULL,a,a->type == REDIS_STRING && b->type == REDIS_STRING);
|
redisAssertWithInfo(NULL,a,a->type == REDIS_STRING && b->type == REDIS_STRING);
|
||||||
char bufa[128], bufb[128], *astr, *bstr;
|
char bufa[128], bufb[128], *astr, *bstr;
|
||||||
size_t alen, blen, minlen;
|
size_t alen, blen, minlen;
|
||||||
int bothsds = 1;
|
|
||||||
|
|
||||||
if (a == b) return 0;
|
if (a == b) return 0;
|
||||||
if (sdsEncodedObject(a)) {
|
if (sdsEncodedObject(a)) {
|
||||||
@ -427,7 +426,6 @@ int compareStringObjectsWithFlags(robj *a, robj *b, int flags) {
|
|||||||
} else {
|
} else {
|
||||||
alen = ll2string(bufa,sizeof(bufa),(long) a->ptr);
|
alen = ll2string(bufa,sizeof(bufa),(long) a->ptr);
|
||||||
astr = bufa;
|
astr = bufa;
|
||||||
bothsds = 0;
|
|
||||||
}
|
}
|
||||||
if (sdsEncodedObject(b)) {
|
if (sdsEncodedObject(b)) {
|
||||||
bstr = b->ptr;
|
bstr = b->ptr;
|
||||||
@ -435,7 +433,6 @@ int compareStringObjectsWithFlags(robj *a, robj *b, int flags) {
|
|||||||
} else {
|
} else {
|
||||||
blen = ll2string(bufb,sizeof(bufb),(long) b->ptr);
|
blen = ll2string(bufb,sizeof(bufb),(long) b->ptr);
|
||||||
bstr = bufb;
|
bstr = bufb;
|
||||||
bothsds = 0;
|
|
||||||
}
|
}
|
||||||
if (flags & REDIS_COMPARE_COLL) {
|
if (flags & REDIS_COMPARE_COLL) {
|
||||||
return strcoll(astr,bstr);
|
return strcoll(astr,bstr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user