]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Fix a compiler warning.
authorGuy Harris <[email protected]>
Sat, 1 Feb 2014 22:08:25 +0000 (14:08 -0800)
committerGuy Harris <[email protected]>
Sat, 1 Feb 2014 22:08:25 +0000 (14:08 -0800)
It's not necessarily safe to do pre-increment or post-increment in an
argument to an EXTRACT_ macro.

print-isoclns.c

index 661aa062e874fff067ff25c464f307a6af39814b..6b21936101617220e56dbc1c8fba6c01e983529a 100644 (file)
@@ -1810,7 +1810,8 @@ isis_print_is_reach_subtlv (const u_int8_t *tptr,u_int subt,u_int subl,const cha
               printf (", LM: %u", EXTRACT_24BITS(tptr));
               tptr=tptr+3;
               printf (", P: %u", *(tptr));
-              printf (", P-ID: %u", EXTRACT_16BITS(++tptr));
+              tptr++;
+              printf (", P-ID: %u", EXTRACT_16BITS(tptr));
             }
             break;
         case ISIS_SUBTLV_EXT_IS_REACH_INTF_SW_CAP_DESCR: