From f637fa6fd0ad1d3a2e5f18ba3b28614d14021a66 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 6 Jan 2001 02:11:18 +0000 Subject: [PATCH] remove redundant declarations. --- lib/libpcap/gencode.c | 7 +++---- lib/libpcap/gencode.h | 4 +++- lib/libpcap/optimize.c | 7 ++----- lib/libpcap/pcap.h | 4 +++- lib/libpcap/scanner.l | 6 ++++-- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/libpcap/gencode.c b/lib/libpcap/gencode.c index 32dafc2da753..2f2fdb1ea752 100644 --- a/lib/libpcap/gencode.c +++ b/lib/libpcap/gencode.c @@ -1,4 +1,4 @@ -/* $NetBSD: gencode.c,v 1.25 2000/12/28 22:04:22 thorpej Exp $ */ +/* $NetBSD: gencode.c,v 1.26 2001/01/06 02:11:18 christos Exp $ */ /* * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 @@ -26,7 +26,7 @@ static const char rcsid[] = "@(#) Header: gencode.c,v 1.93 97/06/12 14:22:47 leres Exp (LBL)"; #else -__RCSID("$NetBSD: gencode.c,v 1.25 2000/12/28 22:04:22 thorpej Exp $"); +__RCSID("$NetBSD: gencode.c,v 1.26 2001/01/06 02:11:18 christos Exp $"); #endif #endif @@ -281,12 +281,12 @@ syntax() static bpf_u_int32 netmask; static int snaplen; int no_optimize; +extern int n_errors; int pcap_compile(pcap_t *p, struct bpf_program *program, char *buf, int optimize, bpf_u_int32 mask) { - extern int n_errors; int len; no_optimize = 0; @@ -333,7 +333,6 @@ pcap_compile_nopcap(int snaplen_arg, int linktype_arg, struct bpf_program *program, char *buf, int optimize, bpf_u_int32 mask, char *errbuf) { - extern int n_errors; pcap_t p; int len; diff --git a/lib/libpcap/gencode.h b/lib/libpcap/gencode.h index b2c3678acc62..517a602522cd 100644 --- a/lib/libpcap/gencode.h +++ b/lib/libpcap/gencode.h @@ -1,4 +1,4 @@ -/* $NetBSD: gencode.h,v 1.9 1999/12/13 01:44:31 itojun Exp $ */ +/* $NetBSD: gencode.h,v 1.10 2001/01/06 02:11:18 christos Exp $ */ /* * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996 @@ -189,7 +189,9 @@ void finish_parse(struct block *); char *sdup(const char *); struct bpf_insn *icode_to_fcode(struct block *, int *); +#ifndef YYRECOVERING int pcap_parse(void); +#endif void lex_init(char *); void sappend(struct slist *, struct slist *); diff --git a/lib/libpcap/optimize.c b/lib/libpcap/optimize.c index 4916c89d2101..b9066cdf73be 100644 --- a/lib/libpcap/optimize.c +++ b/lib/libpcap/optimize.c @@ -1,4 +1,4 @@ -/* $NetBSD: optimize.c,v 1.12 2000/11/19 13:18:03 itojun Exp $ */ +/* $NetBSD: optimize.c,v 1.13 2001/01/06 02:11:18 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994, 1995, 1996 @@ -28,7 +28,7 @@ static const char rcsid[] = "@(#) Header: optimize.c,v 1.60 96/09/26 23:28:14 leres Exp (LBL)"; #else -__RCSID("$NetBSD: optimize.c,v 1.12 2000/11/19 13:18:03 itojun Exp $"); +__RCSID("$NetBSD: optimize.c,v 1.13 2001/01/06 02:11:18 christos Exp $"); #endif #endif @@ -122,9 +122,6 @@ static void opt_peep(struct block *); static void opt_stmt(struct stmt *, int[], int); static void deadstmt(struct stmt *, struct stmt *[]); static void opt_deadstores(struct block *); -static void opt_blk(struct block *, int); -static int use_conflict(struct block *, struct block *); -static void opt_j(struct edge *); static struct block *fold_edge(struct block *, struct edge *); static inline int eq_blk(struct block *, struct block *); static int slength(struct slist *); diff --git a/lib/libpcap/pcap.h b/lib/libpcap/pcap.h index 8fccdfce913b..6672b405fc07 100644 --- a/lib/libpcap/pcap.h +++ b/lib/libpcap/pcap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pcap.h,v 1.8 2000/10/06 16:39:24 thorpej Exp $ */ +/* $NetBSD: pcap.h,v 1.9 2001/01/06 02:11:18 christos Exp $ */ /* * Copyright (c) 1993, 1994, 1995, 1996 @@ -136,7 +136,9 @@ pcap_dumper_t *pcap_dump_open(pcap_t *, char *); void pcap_dump_close(pcap_dumper_t *); void pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *); +#ifdef notdef /* XXX this guy lives in the bpf tree */ u_int bpf_filter(struct bpf_insn *, u_char *, u_int, u_int); +#endif char *bpf_image(struct bpf_insn *, int); #endif diff --git a/lib/libpcap/scanner.l b/lib/libpcap/scanner.l index 3fe6264b06e9..58903b9e0515 100644 --- a/lib/libpcap/scanner.l +++ b/lib/libpcap/scanner.l @@ -1,5 +1,5 @@ %{ -/* $NetBSD: scanner.l,v 1.12 2000/12/28 22:12:07 thorpej Exp $ */ +/* $NetBSD: scanner.l,v 1.13 2001/01/06 02:11:19 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 @@ -28,7 +28,7 @@ static const char rcsid[] = "@(#) Header: scanner.l,v 1.56 97/07/21 13:31:50 leres Exp (LBL)"; #else -__RCSID("$NetBSD: scanner.l,v 1.12 2000/12/28 22:12:07 thorpej Exp $"); +__RCSID("$NetBSD: scanner.l,v 1.13 2001/01/06 02:11:19 christos Exp $"); #endif #endif @@ -80,7 +80,9 @@ static inline int xdtoi(int); #endif #define yylval pcap_lval +#ifdef notdef extern YYSTYPE yylval; +#endif static char *in_buffer;