summaryrefslogtreecommitdiff
path: root/src/object.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-11-30 09:41:54 +0100
committerantirez <antirez@gmail.com>2019-01-09 17:00:29 +0100
commit317f8b9d383f1b7f171aef7ea29f9e05abf0ba83 (patch)
tree28f4ca9efb35812f013ac459b18cc5e861591032 /src/object.c
parent1b7298e66ae002b9011c22d8270436506a9dc9b1 (diff)
downloadredis-317f8b9d383f1b7f171aef7ea29f9e05abf0ba83.tar.gz
RESP3: most null replies converted.
Diffstat (limited to 'src/object.c')
-rw-r--r--src/object.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/object.c b/src/object.c
index 041af8b01..ec0bd02ee 100644
--- a/src/object.c
+++ b/src/object.c
@@ -1248,15 +1248,15 @@ NULL
};
addReplyHelp(c, help);
} else if (!strcasecmp(c->argv[1]->ptr,"refcount") && c->argc == 3) {
- if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.nullbulk))
+ if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.null[c->resp]))
== NULL) return;
addReplyLongLong(c,o->refcount);
} else if (!strcasecmp(c->argv[1]->ptr,"encoding") && c->argc == 3) {
- if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.nullbulk))
+ if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.null[c->resp]))
== NULL) return;
addReplyBulkCString(c,strEncoding(o->encoding));
} else if (!strcasecmp(c->argv[1]->ptr,"idletime") && c->argc == 3) {
- if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.nullbulk))
+ if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.null[c->resp]))
== NULL) return;
if (server.maxmemory_policy & MAXMEMORY_FLAG_LFU) {
addReplyError(c,"An LFU maxmemory policy is selected, idle time not tracked. Please note that when switching between policies at runtime LRU and LFU data will take some time to adjust.");
@@ -1264,7 +1264,7 @@ NULL
}
addReplyLongLong(c,estimateObjectIdleTime(o)/1000);
} else if (!strcasecmp(c->argv[1]->ptr,"freq") && c->argc == 3) {
- if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.nullbulk))
+ if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.null[c->resp]))
== NULL) return;
if (!(server.maxmemory_policy & MAXMEMORY_FLAG_LFU)) {
addReplyError(c,"An LFU maxmemory policy is not selected, access frequency not tracked. Please note that when switching between policies at runtime LRU and LFU data will take some time to adjust.");
@@ -1316,7 +1316,7 @@ NULL
}
}
if ((de = dictFind(c->db->dict,c->argv[2]->ptr)) == NULL) {
- addReply(c, shared.nullbulk);
+ addReplyNull(c);
return;
}
size_t usage = objectComputeSize(dictGetVal(de),samples);