Skip to content

Commit fde5e73

Browse files
committedJul 24, 2019
Merge branch 'unstable' of github.com:/antirez/redis into unstable
2 parents e53a26b + dbee7ca commit fde5e73

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed
 

‎src/cluster.c

+3-10
Original file line numberDiff line numberDiff line change
@@ -4251,12 +4251,7 @@ NULL
42514251
}
42524252
} else if (!strcasecmp(c->argv[1]->ptr,"nodes") && c->argc == 2) {
42534253
/* CLUSTER NODES */
4254-
robj *o;
4255-
sds ci = clusterGenNodesDescription(0);
4256-
4257-
o = createObject(OBJ_STRING,ci);
4258-
addReplyBulk(c,o);
4259-
decrRefCount(o);
4254+
addReplyBulkSds(c,clusterGenNodesDescription(0));
42604255
} else if (!strcasecmp(c->argv[1]->ptr,"myid") && c->argc == 2) {
42614256
/* CLUSTER MYID */
42624257
addReplyBulkCBuffer(c,myself->name, CLUSTER_NAMELEN);
@@ -4832,7 +4827,7 @@ int verifyDumpPayload(unsigned char *p, size_t len) {
48324827
* DUMP is actually not used by Redis Cluster but it is the obvious
48334828
* complement of RESTORE and can be useful for different applications. */
48344829
void dumpCommand(client *c) {
4835-
robj *o, *dumpobj;
4830+
robj *o;
48364831
rio payload;
48374832

48384833
/* Check if the key is here. */
@@ -4845,9 +4840,7 @@ void dumpCommand(client *c) {
48454840
createDumpPayload(&payload,o,c->argv[1]);
48464841

48474842
/* Transfer to the client */
4848-
dumpobj = createObject(OBJ_STRING,payload.io.buffer.ptr);
4849-
addReplyBulk(c,dumpobj);
4850-
decrRefCount(dumpobj);
4843+
addReplyBulkSds(c,payload.io.buffer.ptr);
48514844
return;
48524845
}
48534846

‎src/config.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -1483,12 +1483,10 @@ void configGetCommand(client *c) {
14831483
matches++;
14841484
}
14851485
if (stringmatch(pattern,"notify-keyspace-events",1)) {
1486-
robj *flagsobj = createObject(OBJ_STRING,
1487-
keyspaceEventsFlagsToString(server.notify_keyspace_events));
1486+
sds flags = keyspaceEventsFlagsToString(server.notify_keyspace_events);
14881487

14891488
addReplyBulkCString(c,"notify-keyspace-events");
1490-
addReplyBulk(c,flagsobj);
1491-
decrRefCount(flagsobj);
1489+
addReplyBulkSds(c,flags);
14921490
matches++;
14931491
}
14941492
if (stringmatch(pattern,"bind",1)) {

0 commit comments

Comments
 (0)