From f73d268b3b49cc2e0a10989e1201186e5674179a Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 29 Jan 2023 04:32:09 +0200 Subject: [PATCH 8/8] packets_json.c: Fix tautological-unsigned-enum-zero-compare warning See osdn #46556 Signed-off-by: Marko Lindqvist --- common/networking/packets_json.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/networking/packets_json.c b/common/networking/packets_json.c index 92ffe062f9..076cd9c9e1 100644 --- a/common/networking/packets_json.c +++ b/common/networking/packets_json.c @@ -142,8 +142,7 @@ void *get_packet_from_connection_json(struct connection *pc, json_int_t packet_type = json_integer_value(pint); utype.type = packet_type; - if (utype.type < 0 - || utype.type >= PACKET_LAST + if (utype.type >= PACKET_LAST || (receive_handler = pc->phs.handlers->receive[utype.type]) == NULL) { log_verbose("Received unsupported packet type %d (%s). The connection " "will be closed now.", -- 2.39.0