mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 18:14:29 +08:00
Clean up the switch statement for the ToS.
Put in an explicit "do nothing" clause for a value of 0, to make it clearer that we handle that case. Put a break after each case. Add blank lines between cases.
This commit is contained in:
parent
514f392197
commit
17a3c28858
@ -581,14 +581,21 @@ ip_print(netdissect_options *ndo,
|
||||
ND_PRINT((ndo, "(tos 0x%x", (int)ipds->ip->ip_tos));
|
||||
/* ECN bits */
|
||||
switch (ipds->ip->ip_tos & 0x03) {
|
||||
|
||||
case 0:
|
||||
break;
|
||||
|
||||
case 1:
|
||||
ND_PRINT((ndo, ",ECT(1)"));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
ND_PRINT((ndo, ",ECT(0)"));
|
||||
break;
|
||||
|
||||
case 3:
|
||||
ND_PRINT((ndo, ",CE"));
|
||||
break;
|
||||
}
|
||||
|
||||
if (ipds->ip->ip_ttl >= 1)
|
||||
|
Loading…
Reference in New Issue
Block a user