X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/e89409254248af64db721ede4babbe9fd1753f6c..c23f7b7dcf9c014cf531d75c22cc254c7ca35e55:/print-ntp.c?ds=sidebyside diff --git a/print-ntp.c b/print-ntp.c index 532e37a2..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.29 2000-09-23 08:03:38 guy 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,10 +36,6 @@ static const char rcsid[] = #include #include -struct mbuf; -struct rtentry; -#include - #include #include @@ -65,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 */ @@ -160,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: