提交 f42fcff6 编写于 作者: A antirez

Rewrite smoveCommand test with ternary operator

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册