mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-27 20:14:12 +08:00
Don't cast away constness.
While we're at it, clean up white space, and cast a size_t to u_int, rather than int, when passeing it to a routine that expects a u_int.
This commit is contained in:
parent
42718eb6f8
commit
6d28d4f426
@ -745,16 +745,15 @@ dhcp6opt_print(netdissect_options *ndo,
|
||||
case DH6OPT_NEW_POSIX_TIMEZONE: /* all three of these options */
|
||||
case DH6OPT_NEW_TZDB_TIMEZONE: /* are encoded similarly */
|
||||
case DH6OPT_MUDURL: /* although GMT might not work */
|
||||
if ( optlen < 5 ) {
|
||||
ND_PRINT((ndo," ?)"));
|
||||
break;
|
||||
if (optlen < 5) {
|
||||
ND_PRINT((ndo, " ?)"));
|
||||
break;
|
||||
}
|
||||
tp=(u_char *) (dh6o + 1);
|
||||
ND_PRINT((ndo,"="));
|
||||
fn_printn(ndo,tp,(int) optlen,NULL);
|
||||
ND_PRINT((ndo,")"));
|
||||
tp = (const u_char *)(dh6o + 1);
|
||||
ND_PRINT((ndo, "="));
|
||||
fn_printn(ndo, tp, (u_int)optlen, NULL);
|
||||
ND_PRINT((ndo, ")"));
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
ND_PRINT((ndo, ")"));
|
||||
|
Loading…
Reference in New Issue
Block a user