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
d353023a
Commit
d353023a
authored
Jun 14, 2018
by
antirez
Browse files
Merge branch 'unstable' of github.com:/antirez/redis into unstable
parents
d6e8fe77
40d5df65
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/db.c
View file @
d353023a
...
...
@@ -480,8 +480,7 @@ void existsCommand(client *c) {
int
j
;
for
(
j
=
1
;
j
<
c
->
argc
;
j
++
)
{
expireIfNeeded
(
c
->
db
,
c
->
argv
[
j
]);
if
(
dbExists
(
c
->
db
,
c
->
argv
[
j
]))
count
++
;
if
(
lookupKeyRead
(
c
->
db
,
c
->
argv
[
j
]))
count
++
;
}
addReplyLongLong
(
c
,
count
);
}
...
...
src/geohash.c
View file @
d353023a
...
...
@@ -144,8 +144,8 @@ int geohashEncode(const GeoHashRange *long_range, const GeoHashRange *lat_range,
(
longitude
-
long_range
->
min
)
/
(
long_range
->
max
-
long_range
->
min
);
/* convert to fixed point based on the step size */
lat_offset
*=
(
1
<<
step
);
long_offset
*=
(
1
<<
step
);
lat_offset
*=
(
1
ULL
<<
step
);
long_offset
*=
(
1
ULL
<<
step
);
hash
->
bits
=
interleave64
(
lat_offset
,
long_offset
);
return
1
;
}
...
...
src/networking.c
View file @
d353023a
...
...
@@ -247,7 +247,7 @@ void _addReplyStringToList(client *c, const char *s, size_t len) {
/* Append to this object when possible. If tail == NULL it was
* set via addDeferredMultiBulkLength(). */
if
(
tail
&&
sdslen
(
tail
)
+
len
<=
PROTO_REPLY_CHUNK_BYTES
)
{
if
(
tail
&&
(
sdsavail
(
tail
)
>=
len
||
sdslen
(
tail
)
+
len
<=
PROTO_REPLY_CHUNK_BYTES
)
)
{
tail
=
sdscatlen
(
tail
,
s
,
len
);
listNodeValue
(
ln
)
=
tail
;
c
->
reply_bytes
+=
len
;
...
...
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