mirror of
https://github.com/redis/redis.git
synced 2026-05-28 04:02:46 -04:00
Remove redundant calls to update refcount of shared integers (#11479)
Since they're created with makeObjectShared, then incrRefCount on them is a NOP. Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
This commit is contained in:
parent
5246bf4544
commit
0cbe10e892
1 changed files with 0 additions and 2 deletions
|
|
@ -158,7 +158,6 @@ robj *createStringObjectFromLongLongWithOptions(long long value, int valueobj) {
|
|||
}
|
||||
|
||||
if (value >= 0 && value < OBJ_SHARED_INTEGERS && valueobj == 0) {
|
||||
incrRefCount(shared.integers[value]);
|
||||
o = shared.integers[value];
|
||||
} else {
|
||||
if (value >= LONG_MIN && value <= LONG_MAX) {
|
||||
|
|
@ -636,7 +635,6 @@ robj *tryObjectEncoding(robj *o) {
|
|||
value < OBJ_SHARED_INTEGERS)
|
||||
{
|
||||
decrRefCount(o);
|
||||
incrRefCount(shared.integers[value]);
|
||||
return shared.integers[value];
|
||||
} else {
|
||||
if (o->encoding == OBJ_ENCODING_RAW) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue