Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use shared replies for hset

  • Loading branch information...
commit 6e9e463f8014cbde1eaabe4c59045471e1871b74 1 parent 0c390ab
@pietern pietern authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 redis.c
View
4 redis.c
@@ -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++;
}
Please sign in to comment.
Something went wrong with that request. Please try again.