Commit f42fcff6 authored by antirez's avatar antirez
Browse files

Rewrite smoveCommand test with ternary operator

parent 19382c8b
......@@ -321,10 +321,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;
}
......
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