diff options
author | Denis Ovsienko <infrastation@yandex.ru> | 2013-12-26 18:08:06 +0400 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2013-12-26 18:19:50 +0400 |
commit | d8acd8f5d0d7cac4881b5552eca5dc40a5d3c0d1 (patch) | |
tree | 5aeac16d418b595a76270d00a2cfb12ebcd31c6c /print-tipc.c | |
parent | ae1fdebb647a437fbec8d3d4845da190da180dd8 (diff) | |
download | tcpdump-d8acd8f5d0d7cac4881b5552eca5dc40a5d3c0d1.tar.gz |
make consistent use of the "tstr" idiom
For each decoder that has more than one instance of truncation signaling
and prints the same string in each instance make sure that the string is
declared as "static const char tstr[]" right after the initial includes
block. Where necessary, replace fputs(s, stdout) with equivalent
printf("%s", s).
Diffstat (limited to 'print-tipc.c')
-rw-r--r-- | print-tipc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/print-tipc.c b/print-tipc.c index 8f2f7691..8dc3abbc 100644 --- a/print-tipc.c +++ b/print-tipc.c @@ -39,6 +39,8 @@ static const char rcsid[] _U_ = #include "ethertype.h" #include "extract.h" /* must come after interface.h */ +static const char tstr[] = "[|TIPC]"; + /* * Transparent Inter-Process Communication (TIPC) protocol. * @@ -223,7 +225,7 @@ print_payload(netdissect_options *ndo, const struct payload_tipc_pkthdr *ap) return; trunc: - ND_PRINT((ndo, "[|TIPC]")); + ND_PRINT((ndo, "%s", tstr)); } static void @@ -291,7 +293,7 @@ print_internal(netdissect_options *ndo, const struct internal_tipc_pkthdr *ap) return; trunc: - ND_PRINT((ndo, "[|TIPC]")); + ND_PRINT((ndo, "%s", tstr)); } static void @@ -338,7 +340,7 @@ print_link_conf(netdissect_options *ndo, const struct link_conf_tipc_pkthdr *ap) return; trunc: - ND_PRINT((ndo, "[|TIPC]")); + ND_PRINT((ndo, "%s", tstr)); } void @@ -381,7 +383,7 @@ tipc_print(netdissect_options *ndo, const u_char *bp, u_int length _U_, return; trunc: - ND_PRINT((ndo, "[|TIPC]")); + ND_PRINT((ndo, "%s", tstr)); } /* |