X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/3cd171317f54bc968808d49e3ca87b6c49ccdcdd..7f349b47608726a788c67747369423e64455bf5e:/print-ntp.c diff --git a/print-ntp.c b/print-ntp.c index 886a45fa..8e795cbc 100644 --- a/print-ntp.c +++ b/print-ntp.c @@ -25,7 +25,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.28 2000-07-01 03:39:07 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.32 2001-08-20 15:36:57 fenner Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -36,12 +36,7 @@ static const char rcsid[] = #include #include -struct mbuf; -struct rtentry; -#include - #include -#include #include #include @@ -66,7 +61,6 @@ ntp_print(register const u_char *cp, u_int length) { register const struct ntpdata *bp; int mode, version, leapind; - static char rclock[5]; bp = (struct ntpdata *)cp; /* Note funny sized packets */ @@ -161,9 +155,7 @@ ntp_print(register const u_char *cp, u_int length) break; case PRIM_REF: - strncpy(rclock, (char *)&(bp->refid), 4); - rclock[4] = '\0'; - fputs(rclock, stdout); + fn_printn((char *)&(bp->refid), 4, NULL); break; case INFO_QUERY: