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
aa7c2934
Commit
aa7c2934
authored
Apr 05, 2010
by
Pieter Noordhuis
Browse files
use long long reply type for HINCRBY
parent
5e26ae88
Changes
1
Show whitespace changes
Inline
Side-by-side
redis.c
View file @
aa7c2934
...
...
@@ -2601,6 +2601,21 @@ static void addReplyLong(redisClient *c, long l) {
addReplySds
(
c
,
sdsnewlen
(
buf
,
len
));
}
static
void
addReplyLongLong
(
redisClient
*
c
,
long
long
ll
)
{
char
buf
[
128
];
size_t
len
;
if
(
ll
==
0
)
{
addReply
(
c
,
shared
.
czero
);
return
;
}
else
if
(
ll
==
1
)
{
addReply
(
c
,
shared
.
cone
);
return
;
}
len
=
snprintf
(
buf
,
sizeof
(
buf
),
":%lld
\r\n
"
,
ll
);
addReplySds
(
c
,
sdsnewlen
(
buf
,
len
));
}
static
void
addReplyUlong
(
redisClient
*
c
,
unsigned
long
ul
)
{
char
buf
[
128
];
size_t
len
;
...
...
@@ -6088,7 +6103,7 @@ static void hincrbyCommand(redisClient *c) {
}
server
.
dirty
++
;
addReplyLong
(
c
,
value
);
addReplyLong
Long
(
c
,
value
);
}
static
void
hgetCommand
(
redisClient
*
c
)
{
...
...
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