]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-cdp.c
Use more the EXTRACT_8BITS() macro to fetch a one-byte value (18/n)
[tcpdump] / print-cdp.c
index 6913e3c2226280fa14a4492923d2fe616539aa4d..188a3321b7d2aab0d823a86d92ed2193eb1d37c0 100644 (file)
@@ -170,7 +170,7 @@ cdp_print(netdissect_options *ndo,
                    case 0x05: /* Version */
                        ND_PRINT((ndo, "\n\t  "));
                        for (i=0;i<len;i++) {
-                           j = *(tptr+i);
+                           j = EXTRACT_8BITS(tptr + i);
                            if (j == '\n') /* lets rework the version string to
                                              get a nice indentation */
                                ND_PRINT((ndo, "\n\t  "));