summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/hdlc.c
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>1998-01-21 02:13:45 +0000
committerbrian <brian@cvs.openbsd.org>1998-01-21 02:13:45 +0000
commit8a2ec42180fb11a937a82cb373eb5158f74e1ab8 (patch)
tree442249b74cfbdcd52476e670964a3b269c05ad77 /usr.sbin/ppp/hdlc.c
parent5391f133fb9aab9e640da69ab7483f786af27580 (diff)
Remove unused #includes.
Make various bits static. Remove unused variables. Submitted by: eivind
Diffstat (limited to 'usr.sbin/ppp/hdlc.c')
-rw-r--r--usr.sbin/ppp/hdlc.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/usr.sbin/ppp/hdlc.c b/usr.sbin/ppp/hdlc.c
index 3f9b797d28a..70a15671e96 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.6 1998/01/10 01:55:16 brian Exp $
+ * $Id: hdlc.c,v 1.7 1998/01/21 02:13:32 brian Exp $
*
* TODO:
*/
@@ -49,7 +49,7 @@
#include "modem.h"
#include "ccp.h"
-struct hdlcstat {
+static struct hdlcstat {
int badfcs;
int badaddr;
int badcommand;
@@ -59,10 +59,8 @@ struct hdlcstat {
static int ifOutPackets;
static int ifOutOctets;
static int ifOutLQRs;
-static int ifInPackets;
-static int ifInOctets;
-struct protostat {
+static struct protostat {
u_short number;
const char *name;
u_long in_count;
@@ -121,8 +119,8 @@ u_char EscMap[33];
void
HdlcInit()
{
- ifInOctets = ifOutOctets = 0;
- ifInPackets = ifOutPackets = 0;
+ ifOutOctets = 0;
+ ifOutPackets = 0;
ifOutLQRs = 0;
}
@@ -138,7 +136,7 @@ HdlcFcs(u_short fcs, u_char * cp, int len)
return (fcs);
}
-inline u_short
+static inline u_short
HdlcFcsBuf(u_short fcs, struct mbuf *m)
{
int len;
@@ -173,7 +171,7 @@ HdlcOutput(int pri, u_short proto, struct mbuf * bp)
return;
if (DEV_IS_SYNC)
- mfcs = NULLBUFF;
+ mfcs = NULL;
else
mfcs = mballoc(2, MB_HDLCOUT);
@@ -371,7 +369,7 @@ Protocol2Nam(u_short proto)
return "unrecognised protocol";
}
-void
+static void
DecodePacket(u_short proto, struct mbuf * bp)
{
u_char *cp;
@@ -406,7 +404,7 @@ DecodePacket(u_short proto, struct mbuf * bp)
case PROTO_VJUNCOMP:
case PROTO_VJCOMP:
bp = VjCompInput(bp, proto);
- if (bp == NULLBUFF) {
+ if (bp == NULL) {
break;
}
/* fall down */
@@ -518,9 +516,6 @@ HdlcInput(struct mbuf * bp)
}
cp = MBUF_CTOP(bp);
- ifInPackets++;
- ifInOctets += bp->cnt;
-
if (!LcpInfo.want_acfcomp) {
/*