#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
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");
}
if (fmt == NULL)
fmt = "#%d";
- (void)sprintf(buf, fmt, v);
+ (void)snprintf(buf, sizeof(buf), fmt, v);
return (buf);
}