]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-cdp.c
Clean up comments.
[tcpdump] / print-cdp.c
index fede229d0a7d80c15fad461dc4615b2d0cf9b757..2a6c1e3a333ba6df05bf72c15e84fde435cd4289 100644 (file)
@@ -93,7 +93,7 @@ void
 cdp_print(netdissect_options *ndo,
           const u_char *pptr, u_int length, u_int caplen)
 {
-       u_int type, len, i, j;
+       u_int type, len, i;
        const u_char *tptr;
 
        ndo->ndo_protocol = "cdp";
@@ -173,12 +173,14 @@ cdp_print(netdissect_options *ndo,
                    case 0x05: /* Version */
                        ND_PRINT("\n\t  ");
                        for (i=0;i<len;i++) {
-                           j = GET_U_1(tptr + i);
-                           if (j == '\n') /* lets rework the version string to
+                           u_char c;
+
+                           c = GET_U_1(tptr + i);
+                           if (c == '\n') /* lets rework the version string to
                                              get a nice indentation */
                                ND_PRINT("\n\t  ");
                            else
-                               fn_print_char(ndo, j);
+                               fn_print_char(ndo, c);
                        }
                        break;
                    case 0x06: /* Platform */