X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=modules%2Fvjcompress.c;h=245ed4cef19c9c069fa0901a512d09ab46b2e817;hb=84a45df38be25f0f4859186ee8e69ebe8c109e4c;hp=eecbef5b35868589936692ce02783d0ac7da2546;hpb=31e80dd05aec83cbee14a9ede031023188e31270;p=ppp.git diff --git a/modules/vjcompress.c b/modules/vjcompress.c index eecbef5..245ed4c 100644 --- a/modules/vjcompress.c +++ b/modules/vjcompress.c @@ -26,10 +26,10 @@ */ /* - * This version is used under SunOS 4.x, DEC Alpha OSF/1, AIX 4.x, + * This version is used under SunOS 4.x, Digital UNIX, AIX 4.x, * and SVR4 systems including Solaris 2. * - * $Id: vjcompress.c,v 1.8 1996/05/24 07:04:26 paulus Exp $ + * $Id: vjcompress.c,v 1.10 1999/09/15 23:49:06 masputra Exp $ */ #include @@ -44,7 +44,7 @@ #endif #endif -#ifdef OSF1 +#ifdef __osf__ #include #endif #include @@ -75,7 +75,7 @@ typedef u_long n_long; #define ovbcopy bcopy #endif -#ifdef OSF1 +#ifdef __osf__ #define getip_hl(base) (((base).ip_vhl)&0xf) #define getth_off(base) ((((base).th_xoff)&0xf0)>>4) @@ -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);