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.
diff --git a/print-ip.c b/print-ip.c
index 6103b11..69e621d 100644
--- a/print-ip.c
+++ b/print-ip.c
@@ -581,14 +581,21 @@
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)