]> The Tcpdump Group git mirrors - libpcap/commitdiff
Get rid of long-vs-int problem in a printf format (sometimes sizeof is
authorguy <guy>
Mon, 29 Mar 2004 21:04:31 +0000 (21:04 +0000)
committerguy <guy>
Mon, 29 Mar 2004 21:04:31 +0000 (21:04 +0000)
an int, sometime's it's a long).

gencode.c

index 3c81fc8f94b0f5bdaab4b0fb276a5df891c90042..c865725ca5db480038686e7b88fa050c484ed189 100644 (file)
--- 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),