]> git.ozlabs.org Git - ppp.git/commitdiff
Cleaned up major lint warnings.
authorAdi Masputra <adi.masputra@sun.com>
Wed, 15 Sep 1999 23:49:06 +0000 (23:49 +0000)
committerAdi Masputra <adi.masputra@sun.com>
Wed, 15 Sep 1999 23:49:06 +0000 (23:49 +0000)
modules/ppp.c
modules/ppp_ahdlc.c
modules/ppp_comp.c
modules/vjcompress.c

index b3a32a39d3b0a75c586f1e0f5d4a474e983cc296..d033f6e173196303a70f4821809df1986e27b7cb 100644 (file)
@@ -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;
index 6d0ef485da9fd0af456131f010a76046a0e0ad8c..1828fe1e96fb40a1f20a48eb0267975aad083178 100644 (file)
@@ -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;
index 96713709b97570ebf04b7bc6a1da3da3ff94bee0..7c475ef28536bed2e32fcfda39d86e2feefd3efb 100644 (file)
@@ -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;
index 66d3402886c22cdd81dc27b7996a81e1e7a150c6..245ed4cef19c9c069fa0901a512d09ab46b2e817 100644 (file)
@@ -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 <sys/types.h>
@@ -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);