X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/45bfdabccfc96c7d2150cd24e1e9c3679f448a28..d00d1670cec6b90d8b8e94c2b6b37f5a08d0ce17:/print-tftp.c diff --git a/print-tftp.c b/print-tftp.c index 0caff428..62e2c998 100644 --- a/print-tftp.c +++ b/print-tftp.c @@ -45,7 +45,7 @@ static const char rcsid[] _U_ = #include "tftp.h" /* op code to string mapping */ -static struct tok op2str[] = { +static const struct tok op2str[] = { { RRQ, "RRQ" }, /* read request */ { WRQ, "WRQ" }, /* write request */ { DATA, "DATA" }, /* data packet */ @@ -56,7 +56,7 @@ static struct tok op2str[] = { }; /* error code to string mapping */ -static struct tok err2str[] = { +static const struct tok err2str[] = { { EUNDEF, "EUNDEF" }, /* not defined */ { ENOTFOUND, "ENOTFOUND" }, /* file not found */ { EACCESS, "EACCESS" }, /* access violation */ @@ -99,15 +99,7 @@ tftp_print(register const u_char *bp, u_int length) case RRQ: case WRQ: case OACK: - /* - * XXX Not all arpa/tftp.h's specify th_stuff as any - * array; use address of th_block instead - */ -#ifdef notdef p = (u_char *)tp->th_stuff; -#else - p = (u_char *)&tp->th_block; -#endif putchar(' '); /* Print filename or first option */ if (opcode != OACK)