use shared replies for hset

This commit is contained in:
Pieter Noordhuis 2010-04-15 15:38:48 +02:00
parent 0c390abc69
commit 6e9e463f80

View File

@ -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++;
}