Merge pull request #885 from gkorland/patch-1

clean a warning, remvoe empty else block
This commit is contained in:
Michael Grunder 2020-10-12 15:47:14 -07:00 committed by GitHub
commit acc917548d
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;
nread = c->funcs->read(c, buf, sizeof(buf));
if (nread > 0) {
if (redisReaderFeed(c->reader, buf, nread) != REDIS_OK) {
__redisSetError(c, c->reader->err, c->reader->errstr);
if (nread < 0) {
return REDIS_ERR;
} else {
}
} else if (nread < 0) {
if (nread > 0 && redisReaderFeed(c->reader, buf, nread) != REDIS_OK) {
__redisSetError(c, c->reader->err, c->reader->errstr);
return REDIS_ERR;
}
return REDIS_OK;