]> The Tcpdump Group git mirrors - libpcap/commitdiff
The value pointed to by "gen_pf_ifname()"'s argument isn't modified, so
authorguy <guy>
Fri, 2 May 2003 08:37:43 +0000 (08:37 +0000)
committerguy <guy>
Fri, 2 May 2003 08:37:43 +0000 (08:37 +0000)
make it a const pointer.

Cast the interface name in the "gen_bcmp()" call in "gen_pf_ifname()" to
squelch a compiler warning.

gencode.c
gencode.h

index 5e1aeedf6a22934c0db001707d796f28ecacab9e..f8765fb5dcb96ccb32582ff6c49010c3b7e81880 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -21,7 +21,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.190 2003-03-28 08:09:48 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.191 2003-05-02 08:37:43 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -4976,7 +4976,7 @@ gen_inbound(dir)
 
 /* PF firewall log matched interface */
 struct block *
-gen_pf_ifname(char *ifname)
+gen_pf_ifname(const char *ifname)
 {
        if (linktype != DLT_PFLOG) {
                bpf_error("ifname supported only for DLT_PFLOG");
@@ -4986,7 +4986,7 @@ gen_pf_ifname(char *ifname)
                bpf_error("ifname interface names can't be larger than 16 characters");
                /* NOTREACHED */
        }
-       return (gen_bcmp(4, strlen(ifname), ifname));
+       return (gen_bcmp(4, strlen(ifname), (const u_char *)ifname));
 }
 
 
index 441995e6a379d7945bf180be426db783f643b0d4..c3a19a7759540445d8f97dfdc2c7b6b22da7e348 100644 (file)
--- a/gencode.h
+++ b/gencode.h
@@ -18,7 +18,7 @@
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.57 2003-03-11 06:23:53 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.58 2003-05-02 08:37:44 guy Exp $ (LBL)
  */
 
 /*
@@ -278,7 +278,7 @@ struct block *gen_atmfield_code(int atmfield, bpf_u_int32 jvalue, bpf_u_int32 jt
 struct block *gen_atmtype_abbrev(int type);
 struct block *gen_atmmulti_abbrev(int type);
 
-struct block *gen_pf_ifname(char *);
+struct block *gen_pf_ifname(const char *);
 struct block *gen_pf_rnr(int);
 struct block *gen_pf_reason(int);
 struct block *gen_pf_action(int);