]> git.ozlabs.org Git - ppp.git/blobdiff - pppdump/deflate.c
Change my paulus@samba.org email address to paulus@ozlabs.org
[ppp.git] / pppdump / deflate.c
index 5668a4d88067f66c86f1ad6a9e06585711f117ef..da7b6c52686cd05f91531a0aa8c02df8492d7de6 100644 (file)
@@ -23,7 +23,7 @@
  * 4. Redistributions of any form whatsoever must retain the following
  *    acknowledgment:
  *    "This product includes software developed by Paul Mackerras
- *     <paulus@samba.org>".
+ *     <paulus@ozlabs.org>".
  *
  * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
  * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
@@ -41,7 +41,7 @@
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
-#include "ppp_defs.h"
+
 #include "ppp-comp.h"
 #include "zlib.h"
 
@@ -115,12 +115,13 @@ z_comp_stats(void *arg, struct compstat *stats)
     *stats = state->stats;
     stats->ratio = stats->unc_bytes;
     out = stats->comp_bytes + stats->unc_bytes;
-    if (stats->ratio <= 0x7ffffff)
-       stats->ratio <<= 8;
+    u_int ratio = stats->ratio;
+    if (ratio <= 0x7ffffff)
+       ratio <<= 8;
     else
        out >>= 8;
     if (out != 0)
-       stats->ratio /= out;
+       stats->ratio = ratio / out;
 }
 
 /*