clean a warning, remvoe empty else block

This commit is contained in:
Guy Korland 2020-10-12 17:15:29 +03:00 committed by GitHub
parent b47fae4e70
commit b086f763e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -938,13 +938,11 @@ int redisBufferRead(redisContext *c) {
return REDIS_ERR; return REDIS_ERR;
nread = c->funcs->read(c, buf, sizeof(buf)); nread = c->funcs->read(c, buf, sizeof(buf));
if (nread > 0) { if (nread < 0) {
if (redisReaderFeed(c->reader, buf, nread) != REDIS_OK) { return REDIS_ERR;
__redisSetError(c, c->reader->err, c->reader->errstr); }
return REDIS_ERR; if (nread > 0 && redisReaderFeed(c->reader, buf, nread) != REDIS_OK) {
} else { __redisSetError(c, c->reader->err, c->reader->errstr);
}
} else if (nread < 0) {
return REDIS_ERR; return REDIS_ERR;
} }
return REDIS_OK; return REDIS_OK;