[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.
atp_print(netdissect_options *ndo,
register const struct atATP *ap, u_int length)
{
atp_print(netdissect_options *ndo,
register const struct atATP *ap, u_int length)
{
uint32_t data;
if ((const u_char *)(ap + 1) > ndo->ndo_snapend) {
uint32_t data;
if ((const u_char *)(ap + 1) > ndo->ndo_snapend) {
/* there shouldn't be any control flags */
if (ap->control & (atpXO|atpEOM|atpSTS)) {
/* there shouldn't be any control flags */
if (ap->control & (atpXO|atpEOM|atpSTS)) {
if (ap->control & atpXO) {
ND_PRINT((ndo, "%cXO", c));
c = ',';
if (ap->control & atpXO) {
ND_PRINT((ndo, "%cXO", c));
c = ',';
}
if (ap->control & atpSTS) {
ND_PRINT((ndo, "%cSTS", c));
}
if (ap->control & atpSTS) {
ND_PRINT((ndo, "%cSTS", c));
}
ND_PRINT((ndo, "]"));
}
}
ND_PRINT((ndo, "]"));
}
atp_bitmap_print(netdissect_options *ndo,
register u_char bm)
{
atp_bitmap_print(netdissect_options *ndo,
register u_char bm)
{
* (gcc is smart enough to eliminate it, at least on the Sparc).
*/
if ((bm + 1) & (bm & 0xff)) {
* (gcc is smart enough to eliminate it, at least on the Sparc).
*/
if ((bm + 1) & (bm & 0xff)) {
for (i = 0; bm; ++i) {
if (bm & 1) {
ND_PRINT((ndo, "%c%d", c, i));
for (i = 0; bm; ++i) {
if (bm & 1) {
ND_PRINT((ndo, "%c%d", c, i));