aboutsummaryrefslogtreecommitdiff
path: root/gzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'gzip.c')
-rw-r--r--gzip.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gzip.c b/gzip.c
index a971229d3..9248cfecd 100644
--- a/gzip.c
+++ b/gzip.c
@@ -282,8 +282,6 @@ extern int save_orig_name; /* set if original name must be saved */
282#define WARN(msg) {if (!quiet) fprintf msg ; \ 282#define WARN(msg) {if (!quiet) fprintf msg ; \
283 if (exit_code == OK) exit_code = WARNING;} 283 if (exit_code == OK) exit_code = WARNING;}
284 284
285#define do_exit(c) exit(c)
286
287 285
288 /* in zip.c: */ 286 /* in zip.c: */
289extern int zip (int in, int out); 287extern int zip (int in, int out);
@@ -1883,13 +1881,13 @@ int gzip_main(int argc, char **argv)
1883 inFileNum = open(ifname, O_RDONLY); 1881 inFileNum = open(ifname, O_RDONLY);
1884 if (inFileNum < 0) { 1882 if (inFileNum < 0) {
1885 perror(ifname); 1883 perror(ifname);
1886 do_exit(WARNING); 1884 exit(WARNING);
1887 } 1885 }
1888 /* Get the time stamp on the input file. */ 1886 /* Get the time stamp on the input file. */
1889 result = stat(ifname, &statBuf); 1887 result = stat(ifname, &statBuf);
1890 if (result < 0) { 1888 if (result < 0) {
1891 perror(ifname); 1889 perror(ifname);
1892 do_exit(WARNING); 1890 exit(WARNING);
1893 } 1891 }
1894 time_stamp = statBuf.st_ctime; 1892 time_stamp = statBuf.st_ctime;
1895 ifile_size = statBuf.st_size; 1893 ifile_size = statBuf.st_size;
@@ -1923,7 +1921,7 @@ int gzip_main(int argc, char **argv)
1923#endif 1921#endif
1924 if (outFileNum < 0) { 1922 if (outFileNum < 0) {
1925 perror(ofname); 1923 perror(ofname);
1926 do_exit(WARNING); 1924 exit(WARNING);
1927 } 1925 }
1928 SET_BINARY_MODE(outFileNum); 1926 SET_BINARY_MODE(outFileNum);
1929 /* Set permissions on the file */ 1927 /* Set permissions on the file */
@@ -1948,7 +1946,7 @@ int gzip_main(int argc, char **argv)
1948 } 1946 }
1949 } 1947 }
1950 1948
1951 do_exit(exit_code); 1949 return(exit_code);
1952} 1950}
1953 1951
1954/* trees.c -- output deflated data using Huffman coding 1952/* trees.c -- output deflated data using Huffman coding