]> The Tcpdump Group git mirrors - libpcap/commitdiff
Don't use old-style function definitions.
authorGuy Harris <[email protected]>
Tue, 20 Mar 2018 18:39:03 +0000 (11:39 -0700)
committerGuy Harris <[email protected]>
Tue, 20 Mar 2018 18:39:03 +0000 (11:39 -0700)
bpf/net/bpf_filter.c

index a01e89e86a801a92ae74e917b5bdd79c2c457dfe..330dacc49dd2029bef527a129682f6db502c6467 100644 (file)
 }
 
 static int
-m_xword(m, k, err)
-       register struct mbuf *m;
-       register int k, *err;
+m_xword(struct mbuf *m, int k, int *err)
 {
        register int len;
        register u_char *cp, *np;
@@ -164,9 +162,7 @@ m_xword(m, k, err)
 }
 
 static int
-m_xhalf(m, k, err)
-       register struct mbuf *m;
-       register int k, *err;
+m_xhalf(struct mbuf *m, int k, int *err)
 {
        register int len;
        register u_char *cp;
@@ -214,12 +210,8 @@ enum {
  * Thanks to Ani Sinha <[email protected]> for providing initial implementation
  */
 u_int
-bpf_filter_with_aux_data(pc, p, wirelen, buflen, aux_data)
-       register const struct bpf_insn *pc;
-       register const u_char *p;
-       u_int wirelen;
-       register u_int buflen;
-       register const struct bpf_aux_data *aux_data;
+bpf_filter_with_aux_data(const struct bpf_insn *pc, const u_char *p,
+    u_int wirelen, u_int buflen, const struct bpf_aux_data *aux_data)
 {
        register u_int32 A, X;
        register bpf_u_int32 k;
@@ -593,11 +585,8 @@ bpf_filter_with_aux_data(pc, p, wirelen, buflen, aux_data)
 }
 
 u_int
-bpf_filter(pc, p, wirelen, buflen)
-       register const struct bpf_insn *pc;
-       register const u_char *p;
-       u_int wirelen;
-       register u_int buflen;
+bpf_filter(const struct bpf_insn *pc, const u_char *p, u_int wirelen,
+    u_int buflen)
 {
        return bpf_filter_with_aux_data(pc, p, wirelen, buflen, NULL);
 }
@@ -615,9 +604,7 @@ bpf_filter(pc, p, wirelen, buflen)
  * Otherwise, a bogus program could easily crash the system.
  */
 int
-bpf_validate(f, len)
-       const struct bpf_insn *f;
-       int len;
+bpf_validate(const struct bpf_insn *f, int len)
 {
        u_int i, from;
        const struct bpf_insn *p;