[BusyBox] wrong "static" in archival/libunarchive/unzip.c !?

Steven Scholz steven.scholz at imc-berlin.de
Sun Feb 9 07:10:03 UTC 2003


Hi there,

since archival/unzip.c uses

extern unsigned int gunzip_crc;
extern unsigned int gunzip_bytes_out;

these variables shouldn't be defined static in archival/libunarchive/unzip.c, should they?

The following patch fixes that:

Index: archival/libunarchive/unzip.c
===================================================================
RCS file: /home/cvsroot/busybox_unstable/archival/libunarchive/unzip.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 unzip.c
--- archival/libunarchive/unzip.c       9 Feb 2003 04:46:34 -0000       1.1.1.3
+++ archival/libunarchive/unzip.c       9 Feb 2003 14:05:43 -0000
@@ -83,7 +83,7 @@
  } huft_t;

  static int gunzip_src_fd;
-static unsigned int gunzip_bytes_out;  /* number of output bytes */
+unsigned int gunzip_bytes_out; /* number of output bytes */
  static unsigned int gunzip_outbuf_count;       /* bytes in output buffer */

  /* gunzip_window size--must be a power of two, and
@@ -92,7 +92,7 @@
  static unsigned char *gunzip_window;

  static unsigned int *gunzip_crc_table;
-static unsigned int gunzip_crc;
+unsigned int gunzip_crc;

  /* If BMAX needs to be larger than 16, then h and x[] should be ulg. */
  #define BMAX 16        /* maximum bit length of any code (16 for explode) */



Cheers,

Steven




More information about the busybox mailing list