summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-09-13 14:34:31 +0200
committerGitHub <noreply@github.com>2018-09-13 14:34:31 +0200
commitf2e946e6813e22966c615c7d7014bc0d7405b4a3 (patch)
treec6d21c9b42817cdfdee1520b4217962880ec96df
parentMerge branch 'warnings' (diff)
parentnhrpd: missing operand added (diff)
downloadfrr-f2e946e6813e22966c615c7d7014bc0d7405b4a3.tar.xz
frr-f2e946e6813e22966c615c7d7014bc0d7405b4a3.zip
Merge pull request #3013 from pacovn/static_analysis__conditional_omitted_operand1
nhrpd: missing operand added
-rw-r--r--nhrpd/nhrp_peer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nhrpd/nhrp_peer.c b/nhrpd/nhrp_peer.c
index e051830f8..203d4aa98 100644
--- a/nhrpd/nhrp_peer.c
+++ b/nhrpd/nhrp_peer.c
@@ -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)