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
5f1212ed
Commit
5f1212ed
authored
Jul 05, 2011
by
Pieter Noordhuis
Browse files
Reorder jumps in s_integer_start
parent
422bd453
Changes
1
Hide whitespace changes
Inline
Side-by-side
parser.c
View file @
5f1212ed
...
...
@@ -188,19 +188,19 @@ size_t redis_parser_execute(redis_parser_t *parser, redis_protocol_t **dst, cons
i64
.
neg
=
0
;
i64
.
ui64
=
0
;
/* Break when char was consumed */
if
(
ch
==
'-'
)
{
i64
.
neg
=
1
;
TRANSITION
(
integer_19
);
}
/* First integer character */
/* Start with number */
if
(
ch
>=
'1'
&&
ch
<=
'9'
)
{
i64
.
ui64
=
ch
-
'0'
;
TRANSITION
(
integer_09
);
}
/* Consume single zero character */
/* Start with negative sign */
if
(
ch
==
'-'
)
{
i64
.
neg
=
1
;
TRANSITION
(
integer_19
);
}
/* Single integer character is a zero */
if
(
ch
==
'0'
)
{
TRANSITION
(
integer_cr
);
}
...
...
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