summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/pred.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-10-26 01:04:02 +0000
committerbrian <brian@FreeBSD.org>1997-10-26 01:04:02 +0000
commit486b8925ecb0d408e403474828e20c1cce8aaec8 (patch)
treecca66974908224bf517868aaafb2e4acd1abe88d /usr.sbin/ppp/pred.c
parent1d2927c9fac7bcfe68bf6ab502c716adc91d6f09 (diff)
downloadFreeBSD-src-486b8925ecb0d408e403474828e20c1cce8aaec8.zip
FreeBSD-src-486b8925ecb0d408e403474828e20c1cce8aaec8.tar.gz
Cosmetic (no functional changes):
o Add missing $Id$s o Move extern decls from .c -> .h files o Staticize o Remove #includes from .h files o style(9)ify includes o bcopy -> memcpy bzero -> memset bcmp -> memcmp index -> strchr rindex -> strrchr o Move timeout.h -> timer.h (making it consistent w/ timer.c) o Add -Wmissing-prototypes
Diffstat (limited to 'usr.sbin/ppp/pred.c')
-rw-r--r--usr.sbin/ppp/pred.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/usr.sbin/ppp/pred.c b/usr.sbin/ppp/pred.c
index 00503896..d6e6a00 100644
--- a/usr.sbin/ppp/pred.c
+++ b/usr.sbin/ppp/pred.c
@@ -1,19 +1,29 @@
-#include "fsm.h"
-#include "hdlc.h"
-#include "lcpproto.h"
-#include "ccp.h"
-
/*
- *
- * $Id: pred.c,v 1.13 1997/06/09 23:38:37 brian Exp $
- *
* pred.c -- Test program for Dave Rand's rendition of the
* predictor algorithm
* Updated by: iand@labtam.labtam.oz.au (Ian Donaldson)
* Updated by: Carsten Bormann <cabo@cs.tu-berlin.de>
* Original : Dave Rand <dlr@bungi.com>/<dave_rand@novell.com>
+ *
+ * $Id: pred.c,v 1.14 1997/08/25 00:29:25 brian Exp $
+ *
*/
+#include <sys/types.h>
+#include <netinet/in.h>
+
+#include <string.h>
+
+#include "mbuf.h"
+#include "log.h"
+#include "defs.h"
+#include "timer.h"
+#include "fsm.h"
+#include "hdlc.h"
+#include "lcpproto.h"
+#include "ccp.h"
+#include "pred.h"
+
/* The following hash code is the heart of the algorithm:
* It builds a sliding hash sum of the previous 3-and-a-bit characters
* which will be used to index the guess table.
@@ -95,11 +105,11 @@ Pred1Init(int direction)
{
if (direction & 1) { /* Input part */
iHash = 0;
- bzero(InputGuessTable, sizeof(InputGuessTable));
+ memset(InputGuessTable, '\0', sizeof(InputGuessTable));
}
if (direction & 2) { /* Output part */
oHash = 0;
- bzero(OutputGuessTable, sizeof(OutputGuessTable));
+ memset(OutputGuessTable, '\0', sizeof(OutputGuessTable));
}
}
@@ -132,7 +142,7 @@ Pred1Output(int pri, u_short proto, struct mbuf * bp)
wp += len;
CcpInfo.compout += len;
} else {
- bcopy(bufp + 2, wp, orglen);
+ memcpy(wp, bufp + 2, orglen);
wp += orglen;
CcpInfo.compout += orglen;
}
OpenPOWER on IntegriCloud