X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/0537e7bf8042cf9954d3b0abab567edf3b5c0516..8df3dcada5e34c6a99666931ee6dcccd57685353:/src/t_hash.c diff --git a/src/t_hash.c b/src/t_hash.c index ad5d3e1e..071b7754 100644 --- a/src/t_hash.c +++ b/src/t_hash.c @@ -249,7 +249,7 @@ void hmsetCommand(redisClient *c) { robj *o; if ((c->argc % 2) == 1) { - addReplySds(c,sdsnew("-ERR wrong number of arguments for HMSET\r\n")); + addReplyError(c,"wrong number of arguments for HMSET"); return; } @@ -310,6 +310,7 @@ void hmgetCommand(redisClient *c) { o = lookupKeyRead(c->db,c->argv[1]); if (o != NULL && o->type != REDIS_HASH) { addReply(c,shared.wrongtypeerr); + return; } /* Note the check for o != NULL happens inside the loop. This is @@ -346,7 +347,7 @@ void hlenCommand(redisClient *c) { if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL || checkType(c,o,REDIS_HASH)) return; - addReplyUlong(c,hashTypeLength(o)); + addReplyLongLong(c,hashTypeLength(o)); } void genericHgetallCommand(redisClient *c, int flags) {