X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppdump%2Fbsd-comp.c;h=966e958a1aa8bdd183ece8d384c3621b326026f0;hb=b1fcf16fa66159f380ee4abd7c9a76b59809dc7b;hp=17c1e3bc1136a78f46c2b6530051689edad9120b;hpb=3b500e7b064714f152caeaec73aae9844d12613b;p=ppp.git diff --git a/pppdump/bsd-comp.c b/pppdump/bsd-comp.c index 17c1e3b..966e958 100644 --- a/pppdump/bsd-comp.c +++ b/pppdump/bsd-comp.c @@ -38,12 +38,14 @@ */ /* - * $Id: bsd-comp.c,v 1.3 1999/04/16 11:35:59 paulus Exp $ + * $Id: bsd-comp.c,v 1.4 2004/01/17 05:47:55 carlsonj Exp $ */ #include +#include #include #include +#include #include "ppp_defs.h" #include "ppp-comp.h" @@ -381,7 +383,7 @@ bsd_init(db, options, opt_len, unit, hdrlen, mru, debug, decomp) || options[0] != CI_BSD_COMPRESS || options[1] != CILEN_BSD_COMPRESS || BSD_VERSION(options[2]) != BSD_CURRENT_VERSION || BSD_NBITS(options[2]) != db->maxbits - || decomp && db->lens == NULL) + || (decomp && db->lens == NULL)) return 0; if (decomp) { @@ -554,11 +556,11 @@ bsd_decompress(state, cmsg, inlen, dmp, outlenp) u_int n_bits = db->n_bits; u_int tgtbitno = 32-n_bits; /* bitno when we have a code */ struct bsd_dict *dictp; - int explen, i, seq, len; + int explen, seq, len; u_int incode, oldcode, finchar; u_char *p, *rptr, *wptr; int ilen; - int dlen, space, codelen, extra; + int codelen, extra; rptr = cmsg; if (*rptr == 0) @@ -614,12 +616,12 @@ bsd_decompress(state, cmsg, inlen, dmp, outlenp) } if (incode > max_ent + 2 || incode > db->maxmaxcode - || incode > max_ent && oldcode == CLEAR) { + || (incode > max_ent && oldcode == CLEAR)) { if (db->debug) { printf("bsd_decomp%d: bad code 0x%x oldcode=0x%x ", db->unit, incode, oldcode); - printf("max_ent=0x%x dlen=%d seqno=%d\n", - max_ent, dlen, db->seqno); + printf("max_ent=0x%x seqno=%d\n", + max_ent, db->seqno); } return DECOMP_FATALERROR; /* probably a bug */ }