X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/78651639891de4a150f23ab635ef940f6ee22d8e..refs/heads/coverity_scan:/print-slow.c diff --git a/print-slow.c b/print-slow.c index 8a75edcc..649e2a0f 100644 --- a/print-slow.c +++ b/print-slow.c @@ -20,9 +20,7 @@ /* \summary: IEEE "slow protocols" (802.3ad/802.3ah) printer */ -#ifdef HAVE_CONFIG_H #include -#endif #include "netdissect-stdinc.h" @@ -355,7 +353,7 @@ slow_marker_lacp_print(netdissect_options *ndo, const struct marker_tlv_marker_info_t *marker_tlv_marker_info; } tlv_ptr; - while(tlen>0) { + while(tlen != 0) { /* is the packet big enough to include the tlv header ? */ if (tlen < sizeof(struct tlv_header_t)) goto tooshort; @@ -525,7 +523,7 @@ slow_oam_print(netdissect_options *ndo, switch (code) { case SLOW_OAM_CODE_INFO: - while (tlen > 0) { + while (tlen != 0) { ptr.slow_oam_tlv_header = (const struct slow_oam_tlv_header_t *)tptr; if (tlen < sizeof(*ptr.slow_oam_tlv_header)) goto tooshort; @@ -622,7 +620,7 @@ slow_oam_print(netdissect_options *ndo, tptr += 2; /* TLVs */ - while (tlen > 0) { + while (tlen != 0) { ptr.slow_oam_tlv_header = (const struct slow_oam_tlv_header_t *)tptr; if (tlen < sizeof(*ptr.slow_oam_tlv_header)) goto tooshort;