]> The Tcpdump Group git mirrors - tcpdump/commitdiff
ForCES: Fixup a cppcheck style notice.
authorDenis Ovsienko <[email protected]>
Tue, 5 Sep 2017 23:31:29 +0000 (00:31 +0100)
committerDenis Ovsienko <[email protected]>
Tue, 5 Sep 2017 23:31:29 +0000 (00:31 +0100)
[print-forces.c:281]: (style) Checking if unsigned variable 'opt' is
less than zero.

print-forces.c

index de6c8264ddc59184301afbc8db4f653db41e4c21..a8f88c136a7bd90e73133043e92fa2e67b198879 100644 (file)
@@ -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];