X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/546558eabd81cfc36a81a4df728fdfea0d83b41a..230e0b85778df66f9cec62d13f0025c78cc0c9da:/print-timed.c diff --git a/print-timed.c b/print-timed.c index f6bfc8ec..f9a5835a 100644 --- a/print-timed.c +++ b/print-timed.c @@ -45,7 +45,7 @@ struct tsp { struct tsp_timeval tspu_time; nd_int8_t tspu_hopcnt; } tsp_u; - nd_byte tsp_name[256]; + nd_byte tsp_name[256]; /* null-terminated string up to 256 */ }; #define tsp_time tsp_u.tspu_time @@ -82,7 +82,6 @@ struct tsp { #define TSPTYPENUMBER 25 -static const char tstr[] = "[|timed]"; static const char *tsptype[TSPTYPENUMBER] = { "ANY", "ADJTIME", "ACK", "MASTERREQ", "MASTERACK", "SETTIME", "MASTERUP", @@ -139,10 +138,11 @@ timed_print(netdissect_options *ndo, break; } ND_PRINT(" name "); - if (fn_print(ndo, (const u_char *)tsp->tsp_name, (const u_char *)tsp->tsp_name + sizeof(tsp->tsp_name))) + if (nd_printzp(ndo, tsp->tsp_name, sizeof(tsp->tsp_name), + ndo->ndo_snapend)) goto trunc; return; trunc: - ND_PRINT(" %s", tstr); + nd_print_trunc(ndo); }