提交 1dbd8e94 编写于 作者: A antirez

More obvious indentation in setCommand().

上级 51010007
......@@ -105,22 +105,26 @@ void setCommand(redisClient *c) {
if ((a[0] == 'n' || a[0] == 'N') &&
(a[1] == 'x' || a[1] == 'X') && a[2] == '\0' &&
!(flags & REDIS_SET_XX)) {
!(flags & REDIS_SET_XX))
{
flags |= REDIS_SET_NX;
} else if ((a[0] == 'x' || a[0] == 'X') &&
(a[1] == 'x' || a[1] == 'X') && a[2] == '\0' &&
!(flags & REDIS_SET_NX)) {
!(flags & REDIS_SET_NX))
{
flags |= REDIS_SET_XX;
} else if ((a[0] == 'e' || a[0] == 'E') &&
(a[1] == 'x' || a[1] == 'X') && a[2] == '\0' &&
!(flags & REDIS_SET_PX) && next) {
!(flags & REDIS_SET_PX) && next)
{
flags |= REDIS_SET_EX;
unit = UNIT_SECONDS;
expire = next;
j++;
} else if ((a[0] == 'p' || a[0] == 'P') &&
(a[1] == 'x' || a[1] == 'X') && a[2] == '\0' &&
!(flags & REDIS_SET_EX) && next) {
!(flags & REDIS_SET_EX) && next)
{
flags |= REDIS_SET_PX;
unit = UNIT_MILLISECONDS;
expire = next;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册