Skip to content

Commit d518279

Browse files
committed
Match types in for loop
1 parent e4304d6 commit d518279

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

read.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static int processLineItem(redisReader *r) {
352352
} else if (cur->type == REDIS_REPLY_BIGNUM) {
353353
/* Ensure all characters are decimal digits (with possible leading
354354
* minus sign). */
355-
for (int i = 0; i < len; i++) {
355+
for (size_t i = 0; i < len; i++) {
356356
/* XXX Consider: Allow leading '+'? Error on leading '0's? */
357357
if (i == 0 && p[0] == '-') continue;
358358
if (p[i] < '0' || p[i] > '9') {
@@ -367,7 +367,7 @@ static int processLineItem(redisReader *r) {
367367
obj = (void*)REDIS_REPLY_BIGNUM;
368368
} else {
369369
/* Type will be error or status. */
370-
for (int i = 0; i < len; i++) {
370+
for (size_t i = 0; i < len; i++) {
371371
if (p[i] == '\r' || p[i] == '\n') {
372372
__redisReaderSetError(r,REDIS_ERR_PROTOCOL,
373373
"Bad simple string value");

0 commit comments

Comments
 (0)