Changed bb_regcomp to xregcomp and #if 0'ed out destroy_cmd_strs in sed.c
[oweals/busybox.git] / gzip.c
diff --git a/gzip.c b/gzip.c
index a971229d33bb5184ff387276fceb69065ee1d9ef..8bc67d9c608c904c71003a9bb645424301a6843b 100644 (file)
--- a/gzip.c
+++ b/gzip.c
@@ -127,7 +127,7 @@ extern int method;                          /* compression method */
 #  define DECLARE(type, array, size)  type * array
 #  define ALLOC(type, array, size) { \
       array = (type*)calloc((size_t)(((size)+1L)/2), 2*sizeof(type)); \
-      if (array == NULL) errorMsg(memory_exhausted, "gzip"); \
+      if (array == NULL) errorMsg(memory_exhausted); \
    }
 #  define FREE(array) {if (array != NULL) free(array), array=NULL;}
 #else
@@ -282,8 +282,6 @@ extern int save_orig_name;          /* set if original name must be saved */
 #define WARN(msg) {if (!quiet) fprintf msg ; \
                   if (exit_code == OK) exit_code = WARNING;}
 
-#define do_exit(c) exit(c)
-
 
        /* in zip.c: */
 extern int zip (int in, int out);
@@ -1883,13 +1881,13 @@ int gzip_main(int argc, char **argv)
                inFileNum = open(ifname, O_RDONLY);
                if (inFileNum < 0) {
                        perror(ifname);
-                       do_exit(WARNING);
+                       exit(WARNING);
                }
                /* Get the time stamp on the input file. */
                result = stat(ifname, &statBuf);
                if (result < 0) {
                        perror(ifname);
-                       do_exit(WARNING);
+                       exit(WARNING);
                }
                time_stamp = statBuf.st_ctime;
                ifile_size = statBuf.st_size;
@@ -1923,7 +1921,7 @@ int gzip_main(int argc, char **argv)
 #endif
                if (outFileNum < 0) {
                        perror(ofname);
-                       do_exit(WARNING);
+                       exit(WARNING);
                }
                SET_BINARY_MODE(outFileNum);
                /* Set permissions on the file */
@@ -1948,7 +1946,7 @@ int gzip_main(int argc, char **argv)
                }
        }
 
-       do_exit(exit_code);
+       return(exit_code);
 }
 
 /* trees.c -- output deflated data using Huffman coding
@@ -3253,7 +3251,7 @@ char *env;                                                /* name of environment variable */
        nargv = (char **) calloc(*argcp + 1, sizeof(char *));
 
        if (nargv == NULL)
-               errorMsg(memory_exhausted, "gzip");
+               errorMsg(memory_exhausted);
        oargv = *argvp;
        *argvp = nargv;