Commit 138e7af5 authored by antirez's avatar antirez
Browse files

Rewrite smoveCommand test with ternary operator

parent 3a9f41ad
...@@ -321,10 +321,7 @@ void smoveCommand(redisClient *c) { ...@@ -321,10 +321,7 @@ void smoveCommand(redisClient *c) {
/* If srcset and dstset are equal, SMOVE is a no-op */ /* If srcset and dstset are equal, SMOVE is a no-op */
if (srcset == dstset) { if (srcset == dstset) {
if (setTypeIsMember(srcset,ele)) addReply(c,setTypeIsMember(srcset,ele) ? shared.cone : shared.czero);
addReply(c,shared.cone);
else
addReply(c,shared.czero);
return; return;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment