From 25e76d5413eee163e3141ba0f6e83f0dd24c5d87 Mon Sep 17 00:00:00 2001 From: Adi Masputra Date: Wed, 15 Sep 1999 23:49:06 +0000 Subject: [PATCH] Cleaned up major lint warnings. --- modules/ppp.c | 14 ++++++-------- modules/ppp_ahdlc.c | 10 +++------- modules/ppp_comp.c | 4 ++-- modules/vjcompress.c | 8 ++++---- 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/modules/ppp.c b/modules/ppp.c index b3a32a3..d033f6e 100644 --- a/modules/ppp.c +++ b/modules/ppp.c @@ -24,7 +24,7 @@ * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, * OR MODIFICATIONS. * - * $Id: ppp.c,v 1.20 1999/09/08 01:11:15 masputra Exp $ + * $Id: ppp.c,v 1.21 1999/09/15 23:49:05 masputra Exp $ */ /* @@ -255,7 +255,9 @@ static upperstr_t *find_dest __P((upperstr_t *, int)); static int putctl2 __P((queue_t *, int, int, int)); static int putctl4 __P((queue_t *, int, int, int)); static int pass_packet __P((upperstr_t *ppa, mblk_t *mp, int outbound)); +#ifdef FILTER_PACKETS static int ip_hard_filter __P((upperstr_t *ppa, mblk_t *mp, int outbound)); +#endif /* FILTER_PACKETS */ #define PPP_ID 0xb1a6 static struct module_info ppp_info = { @@ -556,7 +558,7 @@ pppuwput(q, mp) queue_t *q; mblk_t *mp; { - upperstr_t *us, *usnext, *ppa, *os, *nps; + upperstr_t *us, *ppa, *nps; struct iocblk *iop; struct linkblk *lb; #ifdef LACHTCP @@ -567,7 +569,6 @@ pppuwput(q, mp) int error, n, sap; mblk_t *mq; struct ppp_idle *pip; - int len; #ifdef PRIOQ queue_t *tlq; #endif /* PRIOQ */ @@ -1042,7 +1043,7 @@ dlpi_request(q, mp, us) int size = mp->b_wptr - mp->b_rptr; mblk_t *reply, *np; upperstr_t *ppa, *os; - int sap, *ip, len; + int sap, len; dl_info_ack_t *info; dl_bind_ack_t *ackp; @@ -1435,7 +1436,6 @@ send_data(mp, us) mblk_t *mp; upperstr_t *us; { - queue_t *q; upperstr_t *ppa; if ((us->flags & US_BLOCKED) || us->npmode == NPMODE_QUEUE) @@ -1447,7 +1447,7 @@ send_data(mp, us) freemsg(mp); return 1; } - if ((q = ppa->lowerq) == 0) { + if (ppa->lowerq == 0) { /* try to send it up the control stream */ if (bcanputnext(ppa->q, mp->b_band)) { /* @@ -1711,9 +1711,7 @@ pppurput(q, mp) mblk_t *mp; { upperstr_t *ppa, *us; - queue_t *uq; int proto, len; - mblk_t *np; struct iocblk *iop; ppa = (upperstr_t *) q->q_ptr; diff --git a/modules/ppp_ahdlc.c b/modules/ppp_ahdlc.c index 6d0ef48..1828fe1 100644 --- a/modules/ppp_ahdlc.c +++ b/modules/ppp_ahdlc.c @@ -24,7 +24,7 @@ * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, * OR MODIFICATIONS. * - * $Id: ppp_ahdlc.c,v 1.10 1999/04/12 06:20:21 paulus Exp $ + * $Id: ppp_ahdlc.c,v 1.11 1999/09/15 23:49:05 masputra Exp $ */ /* @@ -343,8 +343,6 @@ ahdlc_rput(q, mp) queue_t *q; mblk_t *mp; { - mblk_t *np; - uchar_t *cp; ahdlc_state_t *state; state = (ahdlc_state_t *) q->q_ptr; @@ -387,13 +385,11 @@ stuff_frame(q, mp) mblk_t *mp; { ahdlc_state_t *state; - int ilen, olen, c, extra, i, code; + int ilen, olen, c, extra, code; mblk_t *omsg, *op, *np; uchar_t *sp, *sp0, *dp, *dp0, *spend; ushort_t fcs; u_int32_t *xaccm, lcp_xaccm[8]; - static uchar_t lcphdr[PPP_HDRLEN] = { 0xff, 0x03, 0xc0, 0x21 }; - uchar_t ppphdr[PPP_HDRLEN]; state = (ahdlc_state_t *) q->q_ptr; ilen = msgdsize(mp); @@ -570,7 +566,7 @@ unstuff_chars(q, mp) ahdlc_state_t *state; mblk_t *om; uchar_t *cp, *cpend, *dp, *dp0; - int c, len, extra, offset; + int c, len, extra; ushort_t fcs; state = (ahdlc_state_t *) q->q_ptr; diff --git a/modules/ppp_comp.c b/modules/ppp_comp.c index 9671370..7c475ef 100644 --- a/modules/ppp_comp.c +++ b/modules/ppp_comp.c @@ -24,7 +24,7 @@ * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, * OR MODIFICATIONS. * - * $Id: ppp_comp.c,v 1.11 1999/04/12 06:20:22 paulus Exp $ + * $Id: ppp_comp.c,v 1.12 1999/09/15 23:49:06 masputra Exp $ */ /* @@ -598,7 +598,7 @@ static int ppp_comp_wsrv(q) queue_t *q; { - mblk_t *mp, *cmp = NULL, *np; + mblk_t *mp, *cmp = NULL; comp_state_t *cp; int len, proto, type, hlen, code; struct ip *ip; diff --git a/modules/vjcompress.c b/modules/vjcompress.c index 66d3402..245ed4c 100644 --- a/modules/vjcompress.c +++ b/modules/vjcompress.c @@ -29,7 +29,7 @@ * This version is used under SunOS 4.x, Digital UNIX, AIX 4.x, * and SVR4 systems including Solaris 2. * - * $Id: vjcompress.c,v 1.9 1996/06/26 00:53:17 paulus Exp $ + * $Id: vjcompress.c,v 1.10 1999/09/15 23:49:06 masputra Exp $ */ #include @@ -300,19 +300,19 @@ vj_compress_tcp(ip, mlen, comp, compress_cid, vjhdrp) * with it. */ goto uncompressed; - if (deltaS = (u_short)(ntohs(th->th_win) - ntohs(oth->th_win))) { + if ((deltaS = (u_short)(ntohs(th->th_win) - ntohs(oth->th_win))) > 0) { ENCODE(deltaS); changes |= NEW_W; } - if (deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack)) { + if ((deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack)) > 0) { if (deltaA > 0xffff) goto uncompressed; ENCODE(deltaA); changes |= NEW_A; } - if (deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq)) { + if ((deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq)) > 0) { if (deltaS > 0xffff) goto uncompressed; ENCODE(deltaS); -- 2.39.2