From: guy Date: Mon, 29 Mar 2004 21:04:31 +0000 (+0000) Subject: Get rid of long-vs-int problem in a printf format (sometimes sizeof is X-Git-Tag: libpcap-0.9.1~193 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/0a56a3721af9ee3dff58131716ca9c7d93bd4a15 Get rid of long-vs-int problem in a printf format (sometimes sizeof is an int, sometime's it's a long). --- diff --git a/gencode.c b/gencode.c index 3c81fc8f..c865725c 100644 --- a/gencode.c +++ b/gencode.c @@ -21,7 +21,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.202 2004-03-28 20:27:12 fenner Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.203 2004-03-29 21:04:31 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -5097,8 +5097,8 @@ gen_pf_ruleset(char *ruleset) /* NOTREACHED */ } if (strlen(ruleset) >= sizeof(((struct pfloghdr *)0)->ruleset)) { - bpf_error("ruleset names can only be %d characters", - sizeof(((struct pfloghdr *)0)->ruleset) - 1); + bpf_error("ruleset names can only be %ld characters", + (long)(sizeof(((struct pfloghdr *)0)->ruleset) - 1)); /* NOTREACHED */ } b0 = gen_bcmp(offsetof(struct pfloghdr, ruleset),