diff options
author | brian <brian@FreeBSD.org> | 1997-05-10 01:22:19 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-05-10 01:22:19 +0000 |
commit | 82bac13560d095243e9988bfb770da73089749c1 (patch) | |
tree | 262cfd051516c08f29f6f133a950e9de9f2d42fd /usr.sbin/ppp/pred.c | |
parent | 1da867bda76bc701006945dfbc4733f550c91c2d (diff) | |
download | FreeBSD-src-82bac13560d095243e9988bfb770da73089749c1.zip FreeBSD-src-82bac13560d095243e9988bfb770da73089749c1.tar.gz |
Tidy up the code - bounds checking, return
value checking etc.
Submitted by: eivind
Diffstat (limited to 'usr.sbin/ppp/pred.c')
-rw-r--r-- | usr.sbin/ppp/pred.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.sbin/ppp/pred.c b/usr.sbin/ppp/pred.c index 587f8bf..e9b76a2 100644 --- a/usr.sbin/ppp/pred.c +++ b/usr.sbin/ppp/pred.c @@ -5,7 +5,7 @@ /* * - * $Id$ + * $Id: pred.c,v 1.9 1997/02/22 16:10:47 peter Exp $ * * pred.c -- Test program for Dave Rand's rendition of the * predictor algorithm @@ -20,8 +20,8 @@ * A better hash function would result in additional compression, * at the expense of time. */ -#define IHASH(x) iHash = (iHash << 4) ^ (x) -#define OHASH(x) oHash = (oHash << 4) ^ (x) +#define IHASH(x) do {iHash = (iHash << 4) ^ (x);} while(0) +#define OHASH(x) do {oHash = (oHash << 4) ^ (x);} while(0) static unsigned short int iHash, oHash; static unsigned char InputGuessTable[65536]; @@ -111,10 +111,7 @@ int direction; } void -Pred1Output(pri, proto, bp) -int pri; -u_short proto; -struct mbuf *bp; +Pred1Output(int pri, u_short proto, struct mbuf *bp) { struct mbuf *mwp; u_char *cp, *wp, *hp; |