]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-lldp.c
Remove more old-compiler compensation.
[tcpdump] / print-lldp.c
index e728bae682a93e19aa421e805db8b36ae7aaeb80..a578f4ea133b7fdebf6bc886acb1b55d53bcc219 100644 (file)
@@ -796,7 +796,7 @@ lldp_private_8021_print(netdissect_options *ndo,
                tval=GET_U_1(tptr + i + 5);
                ND_PRINT("\n\t      Priority: %u, RES: %u, Sel: %u, Protocol ID: %u",
                         tval >> 5, (tval >> 3) & 0x03, (tval & 0x07),
-                        GET_BE_U_2(tptr + i + 5));
+                        GET_BE_U_2(tptr + i + 6));
                i=i+3;
         }
         break;
@@ -1163,10 +1163,11 @@ lldp_private_dcbx_print(netdissect_options *ndo,
 {
     int hexdump = FALSE;
     u_int subtype;
-    uint8_t tval;
+    uint16_t tval;
     uint16_t tlv;
     uint32_t i, pgval, uval;
-    u_int tlen, tlv_type, tlv_len;
+    u_int tlen, tlv_type;
+    uint16_t tlv_len;
     const u_char *tptr, *mptr;
 
     if (len < 4) {
@@ -1359,10 +1360,10 @@ lldp_network_addr_print(netdissect_options *ndo, const u_char *tptr, u_int len)
     }
 
     if (!pfunc) {
-        nd_snprintf(buf, sizeof(buf), "AFI %s (%u), no AF printer !",
+        snprintf(buf, sizeof(buf), "AFI %s (%u), no AF printer !",
                  tok2str(af_values, "Unknown", af), af);
     } else {
-        nd_snprintf(buf, sizeof(buf), "AFI %s (%u): %s",
+        snprintf(buf, sizeof(buf), "AFI %s (%u): %s",
                  tok2str(af_values, "Unknown", af), af, (*pfunc)(ndo, tptr+1));
     }