summaryrefslogtreecommitdiff
path: root/redis.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2009-12-10 16:38:24 +0100
committerantirez <antirez@gmail.com>2009-12-10 16:38:24 +0100
commit333fd216159120be0b0ce66d707fceb5e47a5aca (patch)
tree1326391b716e9c934b5a40ec368156bcad107dff /redis.c
parent231d758eecf6e492c8b40cddf4bc9e3a4dbf39cb (diff)
downloadredis-333fd216159120be0b0ce66d707fceb5e47a5aca.tar.gz
TODO change and minor SETNX optimization
Diffstat (limited to 'redis.c')
-rw-r--r--redis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/redis.c b/redis.c
index 302a2129d..371f78908 100644
--- a/redis.c
+++ b/redis.c
@@ -2979,7 +2979,7 @@ static void echoCommand(redisClient *c) {
static void setGenericCommand(redisClient *c, int nx) {
int retval;
- deleteIfVolatile(c->db,c->argv[1]);
+ if (nx) deleteIfVolatile(c->db,c->argv[1]);
retval = dictAdd(c->db->dict,c->argv[1],c->argv[2]);
if (retval == DICT_ERR) {
if (!nx) {