mirror of
https://github.com/fluencelabs/redis
synced 2025-04-25 10:32:14 +00:00
Merge branch 'unstable' of github.com:/antirez/redis into unstable
This commit is contained in:
commit
e8dd99fa53
@ -206,7 +206,11 @@ int geohashDecodeWGS84(const GeoHashBits hash, GeoHashArea *area) {
|
|||||||
int geohashDecodeAreaToLongLat(const GeoHashArea *area, double *xy) {
|
int geohashDecodeAreaToLongLat(const GeoHashArea *area, double *xy) {
|
||||||
if (!xy) return 0;
|
if (!xy) return 0;
|
||||||
xy[0] = (area->longitude.min + area->longitude.max) / 2;
|
xy[0] = (area->longitude.min + area->longitude.max) / 2;
|
||||||
|
if (xy[0] > GEO_LONG_MAX) xy[0] = GEO_LONG_MAX;
|
||||||
|
if (xy[0] < GEO_LONG_MIN) xy[0] = GEO_LONG_MIN;
|
||||||
xy[1] = (area->latitude.min + area->latitude.max) / 2;
|
xy[1] = (area->latitude.min + area->latitude.max) / 2;
|
||||||
|
if (xy[1] > GEO_LAT_MAX) xy[1] = GEO_LAT_MAX;
|
||||||
|
if (xy[1] < GEO_LAT_MIN) xy[1] = GEO_LAT_MIN;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ int getTimeoutFromObjectOrReply(client *c, robj *object, mstime_t *timeout, int
|
|||||||
|
|
||||||
if (unit == UNIT_SECONDS) {
|
if (unit == UNIT_SECONDS) {
|
||||||
if (getLongDoubleFromObjectOrReply(c,object,&ftval,
|
if (getLongDoubleFromObjectOrReply(c,object,&ftval,
|
||||||
"timeout is not an float or out of range") != C_OK)
|
"timeout is not a float or out of range") != C_OK)
|
||||||
return C_ERR;
|
return C_ERR;
|
||||||
tval = (long long) (ftval * 1000.0);
|
tval = (long long) (ftval * 1000.0);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user