* gzip.c (foreground): Initialize to zero. This doesn't fix a bug
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 12 Feb 2007 05:24:34 +0000 (05:24 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 12 Feb 2007 05:24:34 +0000 (05:24 +0000)
since C guarantees it's zero, but it's more consistent with the
rest of the code.  Problem reported by Mark Adler.

ChangeLog
gzip.c

index efbadb397173cf47152c290af8dd205b4af11dcf..fbcd47d6fbcaef8b9f1523299d469d94cff20ea9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * gzip.c (foreground): Initialize to zero.  This doesn't fix a bug
+       since C guarantees it's zero, but it's more consistent with the
+       rest of the code.  Problem reported by Mark Adler.
+
 2007-02-08  Paul Eggert  <eggert@cs.ucla.edu>
 
        * zdiff.in: Don't use '((' in a shell script, as it's not portable
diff --git a/gzip.c b/gzip.c
index 0d34b77d8cc373194e708ec9db876dada4e8ecfd..77b1c9d73ee3cf6e9b8f25b189691f1aae1998c8 100644 (file)
--- a/gzip.c
+++ b/gzip.c
@@ -199,7 +199,7 @@ int verbose = 0;      /* be verbose (-v) */
 int quiet = 0;        /* be very quiet (-q) */
 int do_lzw = 0;       /* generate output compatible with old compress (-Z) */
 int test = 0;         /* test .gz file integrity */
-int foreground;       /* set if program run in foreground */
+int foreground = 0;   /* set if program run in foreground */
 char *program_name;   /* program name */
 int maxbits = BITS;   /* max bits per code for LZW */
 int method = DEFLATED;/* compression method */