mirror of https://mirror.osredm.com/root/redis.git
Simplify arithmetic expression on LP_REPLACE case in lpinsert (#6327)
Remove unnecessary variable name.
This commit is contained in:
parent
693acc0114
commit
53e7de205f
|
@ -861,8 +861,7 @@ unsigned char *lpInsert(unsigned char *lp, unsigned char *elestr, unsigned char
|
||||||
if (where == LP_BEFORE) {
|
if (where == LP_BEFORE) {
|
||||||
memmove(dst+enclen+backlen_size,dst,old_listpack_bytes-poff);
|
memmove(dst+enclen+backlen_size,dst,old_listpack_bytes-poff);
|
||||||
} else { /* LP_REPLACE. */
|
} else { /* LP_REPLACE. */
|
||||||
long lendiff = (enclen+backlen_size)-replaced_len;
|
memmove(dst+enclen+backlen_size,
|
||||||
memmove(dst+replaced_len+lendiff,
|
|
||||||
dst+replaced_len,
|
dst+replaced_len,
|
||||||
old_listpack_bytes-poff-replaced_len);
|
old_listpack_bytes-poff-replaced_len);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue