diff options
author | antirez <antirez@gmail.com> | 2015-05-15 17:38:48 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-05-15 17:38:48 +0200 |
commit | eb138f1511127c3aff428729feed99741b4f0124 (patch) | |
tree | b579fc0d56e8a719f012e801896dc56648d9e8e4 /src/t_set.c | |
parent | cb9a5a78219db209a7b6a4b368ce9bf87d99a7d5 (diff) | |
download | redis-eb138f1511127c3aff428729feed99741b4f0124.tar.gz |
Rewrite smoveCommand test with ternary operator
Diffstat (limited to 'src/t_set.c')
-rw-r--r-- | src/t_set.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/t_set.c b/src/t_set.c index f50c0aa34..e8ce783c0 100644 --- a/src/t_set.c +++ b/src/t_set.c @@ -343,10 +343,7 @@ void smoveCommand(redisClient *c) { /* If srcset and dstset are equal, SMOVE is a no-op */ if (srcset == dstset) { - if (setTypeIsMember(srcset,ele)) - addReply(c,shared.cone); - else - addReply(c,shared.czero); + addReply(c,setTypeIsMember(srcset,ele) ? shared.cone : shared.czero); return; } |