Commit eb138f15 authored by antirez's avatar antirez
Browse files

Rewrite smoveCommand test with ternary operator

parent cb9a5a78
......@@ -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;
}
......
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