]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tftp.c
Use nd_ types, add EXTRACT_ calls.
[tcpdump] / print-tftp.c
index c0b1338493c7533642380e7f6e4322253ede5bc4..e0bedc3918b7202b0b07e0a54a37d8b4b5d98078 100644 (file)
@@ -89,10 +89,10 @@ static const struct tok err2str[] = {
  */
 void
 tftp_print(netdissect_options *ndo,
-           register const u_char *bp, u_int length)
+           const u_char *bp, u_int length)
 {
-       register const char *cp;
-       register int opcode;
+       const char *cp;
+       int opcode;
        u_int ui;
 
        /* Print length */
@@ -140,7 +140,7 @@ tftp_print(netdissect_options *ndo,
                /* Print options, if any */
                while (length != 0) {
                        ND_TCHECK_1(bp);
-                       if (*bp != '\0')
+                       if (EXTRACT_U_1(bp) != '\0')
                                ND_PRINT((ndo, " "));
                        ui = fn_printztn(ndo, bp, length, ndo->ndo_snapend);
                        if (ui == 0)
@@ -154,7 +154,7 @@ tftp_print(netdissect_options *ndo,
                /* Print options */
                while (length != 0) {
                        ND_TCHECK_1(bp);
-                       if (*bp != '\0')
+                       if (EXTRACT_U_1(bp) != '\0')
                                ND_PRINT((ndo, " "));
                        ui = fn_printztn(ndo, bp, length, ndo->ndo_snapend);
                        if (ui == 0)