From: Denis Ovsienko Date: Tue, 5 Sep 2017 23:31:29 +0000 (+0100) Subject: ForCES: Fixup a cppcheck style notice. X-Git-Tag: tcpdump-4.99-bp~1992 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/2dfa645e867c9398561b49940b0079690c174c28 ForCES: Fixup a cppcheck style notice. [print-forces.c:281]: (style) Checking if unsigned variable 'opt' is less than zero. --- diff --git a/print-forces.c b/print-forces.c index de6c8264..a8f88c13 100644 --- a/print-forces.c +++ b/print-forces.c @@ -278,7 +278,7 @@ static const struct optlv_h OPTLV_msg[F_OP_MAX + 1] = { static inline const struct optlv_h *get_forces_optlv_h(uint16_t opt) { - if (opt > F_OP_MAX || opt <= F_OP_RSV) + if (opt > F_OP_MAX || opt == F_OP_RSV) return &OPTLV_msg[F_OP_RSV]; return &OPTLV_msg[opt];