Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
d4c4f20a
Unverified
Commit
d4c4f20a
authored
Jun 17, 2018
by
Max Vetrov
Committed by
GitHub
Jun 17, 2018
Browse files
Update sort.c
Redundant second if, and we may use "not" operation for bool, I suppose it's faster.
parent
2e0ab4a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sort.c
View file @
d4c4f20a
...
...
@@ -447,7 +447,7 @@ void sortCommand(client *c) {
serverAssertWithInfo
(
c
,
sortval
,
j
==
vectorlen
);
/* Now it's time to load the right scores in the sorting vector */
if
(
dontsort
==
0
)
{
if
(
!
dontsort
)
{
for
(
j
=
0
;
j
<
vectorlen
;
j
++
)
{
robj
*
byval
;
if
(
sortby
)
{
...
...
@@ -487,9 +487,7 @@ void sortCommand(client *c) {
decrRefCount
(
byval
);
}
}
}
if
(
dontsort
==
0
)
{
server
.
sort_desc
=
desc
;
server
.
sort_alpha
=
alpha
;
server
.
sort_bypattern
=
sortby
?
1
:
0
;
...
...
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