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
ddc7b85c
Commit
ddc7b85c
authored
Jun 29, 2015
by
antirez
Browse files
Geo: GEOENCODE: fix command arity check.
parent
6a8e108e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/geo.c
View file @
ddc7b85c
...
...
@@ -600,11 +600,11 @@ void geoDecodeCommand(redisClient *c) {
/* GEOENCODE long lat [radius unit] */
void
geoEncodeCommand
(
redisClient
*
c
)
{
double
radius_meters
=
0
;
if
(
c
->
argc
>
=
5
)
{
if
(
c
->
argc
=
=
5
)
{
if
((
radius_meters
=
extractDistanceOrReply
(
c
,
c
->
argv
+
3
,
NULL
))
<
0
)
return
;
}
else
if
(
c
->
argc
==
4
)
{
addReplyError
(
c
,
"
must provide units when asking for
radius
encode
"
);
}
else
if
(
c
->
argc
==
4
||
c
->
argc
>
5
)
{
addReplyError
(
c
,
"
syntax error, try: GEOENCODE x y [
radius
unit]
"
);
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