]> git.proxmox.com Git - mirror_frr.git/commitdiff
nhrpd: missing operand added
authorF. Aragon <paco@voltanet.io>
Thu, 13 Sep 2018 10:05:20 +0000 (12:05 +0200)
committerF. Aragon <paco@voltanet.io>
Thu, 13 Sep 2018 10:05:20 +0000 (12:05 +0200)
Detected using -Wgnu-conditional-omitted-operand

Signed-off-by: F. Aragon <paco@voltanet.io>
nhrpd/nhrp_peer.c

index e051830f8524681ea0ab0daa848dac472dd403ad..203d4aa98cdd0126f8d4138fd4f064611040d586 100644 (file)
@@ -814,8 +814,9 @@ static void nhrp_packet_debug(struct zbuf *zb, const char *dir)
 
        reply = packet_types[hdr->type].type == PACKET_REPLY;
        debugf(NHRP_DEBUG_COMMON, "%s %s(%d) %s -> %s", dir,
-              packet_types[hdr->type].name ?: "Unknown", hdr->type,
-              reply ? buf[1] : buf[0], reply ? buf[0] : buf[1]);
+              (packet_types[hdr->type].name ? packet_types[hdr->type].name
+                                            : "Unknown"),
+              hdr->type, reply ? buf[1] : buf[0], reply ? buf[0] : buf[1]);
 }
 
 static int proto2afi(uint16_t proto)