]> The Tcpdump Group git mirrors - libpcap/commitdiff
Don't use old-style function definitions.
authorGuy Harris <[email protected]>
Tue, 20 Mar 2018 19:06:05 +0000 (12:06 -0700)
committerGuy Harris <[email protected]>
Tue, 20 Mar 2018 19:06:05 +0000 (12:06 -0700)
bpf_image.c
etherent.c
gencode.c
nametoaddr.c

index caaa8ceb1056e56fa508666fbbf8a509cb6129ad..91c1d39398f77468e07ed371e38bbf299cb8a428 100644 (file)
@@ -35,9 +35,7 @@
 #endif
 
 char *
-bpf_image(p, n)
-       const struct bpf_insn *p;
-       int n;
+bpf_image(const struct bpf_insn *p, int n)
 {
        int v;
        const char *fmt, *op;
index 237a7fb253e600a659ab96ddf7b4348c099a56b6..f9bb99c2dc40d5267c5dae3e281ceb78e71877dd 100644 (file)
@@ -44,8 +44,7 @@ static inline int skip_line(FILE *);
 
 /* Hex digit to integer. */
 static inline int
-xdtoi(c)
-       register int c;
+xdtoi(int c)
 {
        if (isdigit(c))
                return c - '0';
@@ -56,8 +55,7 @@ xdtoi(c)
 }
 
 static inline int
-skip_space(f)
-       FILE *f;
+skip_space(FILE *f)
 {
        int c;
 
@@ -69,8 +67,7 @@ skip_space(f)
 }
 
 static inline int
-skip_line(f)
-       FILE *f;
+skip_line(FILE *f)
 {
        int c;
 
index a39ce756280dff6e25b4b141f398ff81430b6396..7ab707fd398c65f3930fbd0b700d3641b522ea07 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -817,8 +817,7 @@ pcap_freecode(struct bpf_program *program)
  * in each block is already resolved.
  */
 static void
-backpatch(list, target)
-       struct block *list, *target;
+backpatch(struct block *list, struct block *target)
 {
        struct block *next;
 
@@ -839,8 +838,7 @@ backpatch(list, target)
  * which of jt and jf is the link.
  */
 static void
-merge(b0, b1)
-       struct block *b0, *b1;
+merge(struct block *b0, struct block *b1)
 {
        register struct block **p = &b0;
 
@@ -902,8 +900,7 @@ finish_parse(compiler_state_t *cstate, struct block *p)
 }
 
 void
-gen_and(b0, b1)
-       struct block *b0, *b1;
+gen_and(struct block *b0, struct block *b1)
 {
        backpatch(b0, b1->head);
        b0->sense = !b0->sense;
@@ -914,8 +911,7 @@ gen_and(b0, b1)
 }
 
 void
-gen_or(b0, b1)
-       struct block *b0, *b1;
+gen_or(struct block *b0, struct block *b1)
 {
        b0->sense = !b0->sense;
        backpatch(b0, b1->head);
@@ -925,8 +921,7 @@ gen_or(b0, b1)
 }
 
 void
-gen_not(b)
-       struct block *b;
+gen_not(struct block *b)
 {
        b->sense = !b->sense;
 }
@@ -2928,8 +2923,7 @@ gen_abs_offset_varpart(compiler_state_t *cstate, bpf_abs_offset *off)
  * Map an Ethernet type to the equivalent PPP type.
  */
 static int
-ethertype_to_ppptype(proto)
-       int proto;
+ethertype_to_ppptype(int proto)
 {
        switch (proto) {
 
@@ -5771,9 +5765,7 @@ lookup_proto(compiler_state_t *cstate, const char *name, int proto)
 
 #if 0
 struct stmt *
-gen_joinsp(s, n)
-       struct stmt **s;
-       int n;
+gen_joinsp(struct stmt **s, int n)
 {
        return NULL;
 }
@@ -6875,8 +6867,7 @@ gen_ecode(compiler_state_t *cstate, const u_char *eaddr, struct qual q)
 }
 
 void
-sappend(s0, s1)
-       struct slist *s0, *s1;
+sappend(struct slist *s0, struct slist *s1)
 {
        /*
         * This is definitely not the best way to do this, but the
index e7b7134ee53cc557ca3135aed181962f29189837..537d6a34c75dd836ad5c825c10b04c78714dd5b9 100644 (file)
@@ -613,8 +613,7 @@ pcap_nametollc(const char *s)
 
 /* Hex digit to integer. */
 static inline int
-xdtoi(c)
-       register int c;
+xdtoi(int c)
 {
        if (isdigit(c))
                return c - '0';