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
hiredis
Commits
ec7eaed9
Commit
ec7eaed9
authored
Jul 07, 2011
by
Pieter Noordhuis
Browse files
No longer store integer sign in struct
parent
fd589829
Changes
2
Show whitespace changes
Inline
Side-by-side
parser.c
View file @
ec7eaed9
...
@@ -200,13 +200,11 @@ size_t redis_parser_execute(redis_parser_t *parser, redis_protocol_t **dst, cons
...
@@ -200,13 +200,11 @@ size_t redis_parser_execute(redis_parser_t *parser, redis_protocol_t **dst, cons
/* Start with negative sign */
/* Start with negative sign */
if
(
ch
==
'-'
)
{
if
(
ch
==
'-'
)
{
i64
.
neg
=
1
;
ADVANCE_AND_MOVE
(
integer_neg_19
);
ADVANCE_AND_MOVE
(
integer_neg_19
);
}
}
/* Start with positive sign */
/* Start with positive sign */
if
(
ch
==
'+'
)
{
if
(
ch
==
'+'
)
{
i64
.
neg
=
0
;
ADVANCE_AND_MOVE
(
integer_pos_19
);
ADVANCE_AND_MOVE
(
integer_pos_19
);
}
}
...
...
parser.h
View file @
ec7eaed9
...
@@ -53,7 +53,6 @@ struct redis_parser_s {
...
@@ -53,7 +53,6 @@ struct redis_parser_s {
/* private: temporary integer (integer reply, bulk length) */
/* private: temporary integer (integer reply, bulk length) */
struct
redis_parser_int64_s
{
struct
redis_parser_int64_s
{
int
neg
;
/* sign */
uint64_t
ui64
;
/* accumulator */
uint64_t
ui64
;
/* accumulator */
int64_t
i64
;
/* result */
int64_t
i64
;
/* result */
}
i64
;
}
i64
;
...
...
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