X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/814765d31c7cf9bf8753cdb2c908f516608c72ee..f5ef0708adcf83cbf3ec912cabbec303c165586c:/util.c diff --git a/util.c b/util.c index 326eae49..9e611ae5 100644 --- a/util.c +++ b/util.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/util.c,v 1.61 1999-11-22 07:25:27 fenner Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/util.c,v 1.63 2000-01-17 06:24:27 itojun Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -175,8 +175,6 @@ relts_print(int secs) static int seconds[]={31536000,604800,86400,3600,60,1}; char **l = lengths; int *s = seconds; - int len; - int i; if (secs == 0) { (void)printf("0s"); @@ -207,7 +205,7 @@ tok2str(register const struct tok *lp, register const char *fmt, } if (fmt == NULL) fmt = "#%d"; - (void)sprintf(buf, fmt, v); + (void)snprintf(buf, sizeof(buf), fmt, v); return (buf); }