diff options
author | Denis Ovsienko <denis@ovsienko.info> | 2017-09-06 09:57:20 +0100 |
---|---|---|
committer | Denis Ovsienko <denis@ovsienko.info> | 2017-09-06 09:58:36 +0100 |
commit | 74e12dfb8d93901fa0103c3e0d14e6cb1298a6ed (patch) | |
tree | 82a05debd7252ed177db81a54ee54a27789ee8c4 /print-atalk.c | |
parent | eb02553274bb47328d4c6f70ccccc04cf511624f (diff) | |
download | tcpdump-74e12dfb8d93901fa0103c3e0d14e6cb1298a6ed.tar.gz |
AppleTalk: Address a few cppcheck style notices.
[print-atalk.c:283]: (style) The scope of the variable 'c' can be
reduced.
[print-atalk.c:380]: (style) The scope of the variable 'c' can be
reduced.
[print-atalk.c:360]: (style) Variable 'c' is assigned a value that is
never used.
Diffstat (limited to 'print-atalk.c')
-rw-r--r-- | print-atalk.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/print-atalk.c b/print-atalk.c index 9d7d69d3..08376b62 100644 --- a/print-atalk.c +++ b/print-atalk.c @@ -280,7 +280,6 @@ static void atp_print(netdissect_options *ndo, register const struct atATP *ap, u_int length) { - char c; uint32_t data; if ((const u_char *)(ap + 1) > ndo->ndo_snapend) { @@ -346,7 +345,7 @@ atp_print(netdissect_options *ndo, /* there shouldn't be any control flags */ if (ap->control & (atpXO|atpEOM|atpSTS)) { - c = '['; + char c = '['; if (ap->control & atpXO) { ND_PRINT((ndo, "%cXO", c)); c = ','; @@ -357,7 +356,6 @@ atp_print(netdissect_options *ndo, } if (ap->control & atpSTS) { ND_PRINT((ndo, "%cSTS", c)); - c = ','; } ND_PRINT((ndo, "]")); } @@ -377,7 +375,6 @@ static void atp_bitmap_print(netdissect_options *ndo, register u_char bm) { - register char c; register int i; /* @@ -386,7 +383,7 @@ atp_bitmap_print(netdissect_options *ndo, * (gcc is smart enough to eliminate it, at least on the Sparc). */ if ((bm + 1) & (bm & 0xff)) { - c = '<'; + register char c = '<'; for (i = 0; bm; ++i) { if (bm & 1) { ND_PRINT((ndo, "%c%d", c, i)); |