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/hdlc.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/hdlc.c')
-rw-r--r-- | usr.sbin/ppp/hdlc.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/usr.sbin/ppp/hdlc.c b/usr.sbin/ppp/hdlc.c index ab2048f..8b44981 100644 --- a/usr.sbin/ppp/hdlc.c +++ b/usr.sbin/ppp/hdlc.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: hdlc.c,v 1.12 1997/04/19 09:25:58 phk Exp $ + * $Id: hdlc.c,v 1.13 1997/04/19 11:31:38 ache Exp $ * * TODO: */ @@ -108,10 +108,7 @@ HdlcInit() * 2.27 for further details. */ inline u_short -HdlcFcs(fcs, cp, len) -u_short fcs; -u_char *cp; -int len; +HdlcFcs(u_short fcs, u_char *cp, int len) { while (len--) fcs = (fcs >> 8) ^ fcstab[(fcs ^ *cp++) & 0xff]; @@ -200,9 +197,7 @@ HdlcOutput(int pri, u_short proto, struct mbuf *bp) } void -DecodePacket(proto, bp) -u_short proto; -struct mbuf *bp; +DecodePacket(u_short proto, struct mbuf *bp) { #ifdef DEBUG logprintf("proto = %04x\n", proto); |