From 42d263adde3fe9060d397d6025542931a5945753 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Tue, 18 Nov 1997 14:08:51 +0000 Subject: [PATCH] Don't test for conflicting combinations of PPP_FILTER/BPFILTER here. Testing in if_ppp.c is good enough. Added comments about bogus #includes and #defines. Removed unused #includes. Don't depend on gcc's misfeature of rewriting short args in old-style function definitions to match wrong prototypes. I just changed the function definition to match the prototype, since this is easy to verify automatically (it causes no changes in the object code), but it breaks K&R1 support and doesn't fix the pessimal type. --- sys/net/ppp_tty.c | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c index f8093c014796..013f27e16dca 100644 --- a/sys/net/ppp_tty.c +++ b/sys/net/ppp_tty.c @@ -70,23 +70,14 @@ * Paul Mackerras (paulus@cs.anu.edu.au). */ -/* $Id: ppp_tty.c,v 1.26 1997/10/18 00:56:23 peter Exp $ */ +/* $Id: ppp_tty.c,v 1.27 1997/10/18 01:20:28 peter Exp $ */ #include "ppp.h" #if NPPP > 0 -#include "opt_ppp.h" - -#define VJC -#define PPP_COMPRESS - -#ifdef PPP_FILTER -#include "bpfilter.h" -#if NBPFILTER == 0 -#error "PPP_FILTER requires bpf" -#endif -#endif +#include "opt_ppp.h" /* XXX for ppp_defs.h */ +#define VJC /* XXX for ppp_defs.h */ #include #include @@ -96,11 +87,14 @@ #include #include #include -#include #include -#undef KERNEL /* so that vnode.h does not try to include vnode_if.h */ +/* + * XXX stop from including . doesn't + * exist if we are an LKM. + */ +#undef KERNEL # include #define KERNEL @@ -108,20 +102,9 @@ #include #endif -#include -#include - -#ifdef VJC -#include -#include -#include -#include -#endif - #ifdef PPP_FILTER #include #endif -#include #include #include @@ -580,10 +563,7 @@ static u_short fcstab[256] = { * Calculate a new FCS given the current FCS and the new data. */ static u_short -pppfcs(fcs, cp, len) - register u_short fcs; - register u_char *cp; - register int len; +pppfcs(u_short fcs, u_char *cp, int len) { while (len--) fcs = PPP_FCS(fcs, *cp++);