Commit 6e9e463f authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

use shared replies for hset

parent 0c390abc
......@@ -6242,13 +6242,13 @@ static robj *hashLookupWriteOrCreate(redisClient *c, robj *key) {
/* ============================= Hash commands ============================== */
static void hsetCommand(redisClient *c) {
int update = 0;
int update;
robj *o;
if ((o = hashLookupWriteOrCreate(c,c->argv[1])) == NULL) return;
hashTryConversion(o,c->argv,2,3);
update = hashReplace(o,c->argv[2],c->argv[3]);
addReplySds(c,sdscatprintf(sdsempty(),":%d\r\n",update == 0));
addReply(c, update ? shared.czero : shared.cone);
server.dirty++;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment