diff options
author | Denis Ovsienko <infrastation@yandex.ru> | 2014-03-31 15:36:01 +0400 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2014-03-31 15:43:22 +0400 |
commit | b46194277a029332c9d1b0ba38110cabc179210f (patch) | |
tree | eea385fe229552f462f9adbb8c15dda3425a27a8 /print-atalk.c | |
parent | 69e1379bcf1f61b01954cbc289636e2b4339a349 (diff) | |
download | tcpdump-b46194277a029332c9d1b0ba38110cabc179210f.tar.gz |
spell "%s" format strings (complements 708a68a)
Make "%s" format string always reside in the print function call
explicitly such that the reader doesn't have to assess its safety.
Diffstat (limited to 'print-atalk.c')
-rw-r--r-- | print-atalk.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/print-atalk.c b/print-atalk.c index 00f9dac4..732e6112 100644 --- a/print-atalk.c +++ b/print-atalk.c @@ -254,7 +254,7 @@ atp_print(netdissect_options *ndo, if ((const u_char *)(ap + 1) > ndo->ndo_snapend) { /* Just bail if we don't have the whole chunk. */ - ND_PRINT((ndo, tstr)); + ND_PRINT((ndo, "%s", tstr)); return; } if (length < sizeof(*ap)) { @@ -398,7 +398,7 @@ nbp_print(netdissect_options *ndo, /* ep points to end of available data */ ep = ndo->ndo_snapend; if ((const u_char *)tp > ep) { - ND_PRINT((ndo, tstr)); + ND_PRINT((ndo, "%s", tstr)); return; } switch (i = np->control & 0xf0) { @@ -407,7 +407,7 @@ nbp_print(netdissect_options *ndo, case nbpLkUp: ND_PRINT((ndo, i == nbpLkUp? " nbp-lkup %d:":" nbp-brRq %d:", np->id)); if ((const u_char *)(tp + 1) > ep) { - ND_PRINT((ndo, tstr)); + ND_PRINT((ndo, "%s", tstr)); return; } (void)nbp_name_print(ndo, tp, ep); @@ -449,7 +449,7 @@ print_cstring(netdissect_options *ndo, register u_int length; if (cp >= (const char *)ep) { - ND_PRINT((ndo, tstr)); + ND_PRINT((ndo, "%s", tstr)); return (0); } length = *cp++; @@ -461,7 +461,7 @@ print_cstring(netdissect_options *ndo, } while ((int)--length >= 0) { if (cp >= (const char *)ep) { - ND_PRINT((ndo, tstr)); + ND_PRINT((ndo, "%s", tstr)); return (0); } ND_PRINT((ndo, "%c", *cp++)); @@ -477,7 +477,7 @@ nbp_tuple_print(netdissect_options *ndo, register const struct atNBPtuple *tpn; if ((const u_char *)(tp + 1) > ep) { - ND_PRINT((ndo, tstr)); + ND_PRINT((ndo, "%s", tstr)); return 0; } tpn = nbp_name_print(ndo, tp, ep); |