Commit b6e6624a authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Change variable names in bulk state

parent e7e12ade
...@@ -316,21 +316,21 @@ size_t redis_parser_execute(redis_parser_t *parser, redis_protocol_t **dst, cons ...@@ -316,21 +316,21 @@ size_t redis_parser_execute(redis_parser_t *parser, redis_protocol_t **dst, cons
case s_bulk: case s_bulk:
l_bulk: l_bulk:
{ {
size_t len = cur->remaining; size_t remaining = cur->remaining;
size_t available = (end-pos);
/* Everything can be read */ /* Everything can be read */
if (len <= (end-pos)) { if (remaining <= available) {
cur->remaining -= len; cur->remaining = 0;
CALLBACK(string, pos, len); CALLBACK(string, pos, remaining);
pos += len; nread += len; pos += remaining; nread += remaining;
TRANSITION_WITHOUT_POS_INCR(bulk_cr); TRANSITION_WITHOUT_POS_INCR(bulk_cr);
} }
/* Not everything can be read */ /* Not everything can be read */
len = (end-pos); cur->remaining -= available;
cur->remaining -= len; CALLBACK(string, pos, available);
CALLBACK(string, pos, len); pos += available; nread += available;
pos += len; nread += len;
goto finalize; goto finalize;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment