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
64b834b8
Commit
64b834b8
authored
Jun 16, 2016
by
Salvatore Sanfilippo
Committed by
GitHub
Jun 16, 2016
Browse files
Merge pull request #3256 from oranagra/georasius_neg
fix georadius returns multiple replies
parents
2f2fd64c
f3e81de1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/geo.c
View file @
64b834b8
...
...
@@ -156,9 +156,13 @@ double extractDistanceOrReply(client *c, robj **argv,
return
-
1
;
}
if
(
distance
<
0
)
{
addReplyError
(
c
,
"radius cannot be negative"
);
return
-
1
;
}
double
to_meters
=
extractUnitOrReply
(
c
,
argv
[
1
]);
if
(
to_meters
<
0
)
{
addReplyError
(
c
,
"radius cannot be negative"
);
return
-
1
;
}
...
...
@@ -465,7 +469,6 @@ void georadiusGeneric(client *c, int type) {
double
radius_meters
=
0
,
conversion
=
1
;
if
((
radius_meters
=
extractDistanceOrReply
(
c
,
c
->
argv
+
base_args
-
2
,
&
conversion
))
<
0
)
{
addReplyError
(
c
,
"radius must be >= 0"
);
return
;
}
...
...
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