Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
1dbd8e94
Commit
1dbd8e94
authored
Feb 03, 2015
by
antirez
Browse files
More obvious indentation in setCommand().
parent
51010007
Changes
1
Show whitespace changes
Inline
Side-by-side
src/t_string.c
View file @
1dbd8e94
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment