X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppdump%2Fbsd-comp.c;h=966e958a1aa8bdd183ece8d384c3621b326026f0;hb=b1fcf16fa66159f380ee4abd7c9a76b59809dc7b;hp=141332665bd85a965f2540185b4e68ff23095293;hpb=a75742c5e72fa5718e57d77586887d58755feebe;p=ppp.git diff --git a/pppdump/bsd-comp.c b/pppdump/bsd-comp.c index 1413326..966e958 100644 --- a/pppdump/bsd-comp.c +++ b/pppdump/bsd-comp.c @@ -383,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) { @@ -556,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) @@ -616,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 */ }