summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2016-05-30 15:31:19 +0200
committerantirez <antirez@gmail.com>2016-05-30 15:31:19 +0200
commit5d4b5fbd6f0105bfac6ec97e29f1f6f142a0b1ac (patch)
tree34ad84328c1c4f639d297076a29194ccfee075a2 /deps
parent18a513f86d5cd53350c988780b409d37fa438834 (diff)
downloadredis-5d4b5fbd6f0105bfac6ec97e29f1f6f142a0b1ac.tar.gz
Geo: fix typo in geohashEstimateStepsByRadius().
I'm the author of this line but I can't see a good reason for it to don't be a typo, a step of 26 should be valid with 52 bits per coordinate, moreover the line was: if (step > 26) step = 25; So a step of 26 was actually already used, except when one of 27 was computed (which is invalid) only then it was trimmed to 25 instead of 26. All tests passing after the change.
Diffstat (limited to 'deps')
-rw-r--r--deps/geohash-int/geohash_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/geohash-int/geohash_helper.c b/deps/geohash-int/geohash_helper.c
index acfb34cde..4b8894676 100644
--- a/deps/geohash-int/geohash_helper.c
+++ b/deps/geohash-int/geohash_helper.c
@@ -72,7 +72,7 @@ uint8_t geohashEstimateStepsByRadius(double range_meters, double lat) {
/* Frame to valid range. */
if (step < 1) step = 1;
- if (step > 26) step = 25;
+ if (step > 26) step = 26;
return step;
}