MT#59962 DRedisConnection: size_t is always >= 0

size_t will always be true against `>=` because
it's a typedef for unsigned long.

Makes no sense to check it, just log what it is.

Fixes: Unsigned compared against 0 (NO_EFFECT)
    unsigned_compare: This greater-than-or-equal-to-zero comparison
    of an unsigned value is always true. reply->len >= 0UL.
Change-Id: I75803cbe0760a1b5c4a0d056af86bc992ea0a110
master
Donat Zenichev 2 months ago
parent 305d860a36
commit 6dfc04d3cc

@ -113,11 +113,10 @@ int DRedisConnection::handle_redis_reply(redisReply *reply, const char* _cmd) {
case REDIS_REPLY_STATUS:
case REDIS_REPLY_STRING:
if (reply->len>=0) {
if (cfg.full_logging) {
DBG("REDIS %s: str: %.*s\n", _cmd, (int) reply->len, reply->str);
}
} break;
if (cfg.full_logging) {
DBG("REDIS %s: str: '%.*s'\n", _cmd, (int) reply->len, reply->str);
}
break;
case REDIS_REPLY_INTEGER:
if (cfg.full_logging) {

Loading…
Cancel
Save