Fix the warnings I created.
[project/opkg-lede.git] / libbb / unzip.c
index 058aa07535539719180b3c3b28b1394f4116a25f..186da594a45c8fff04bb3748fbd769cf391615a1 100644 (file)
@@ -45,6 +45,7 @@
 #include <signal.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 #include "libbb.h"
 
 static FILE *in_file, *out_file;
@@ -98,7 +99,7 @@ static const unsigned short mask_bits[] = {
 static void abort_gzip()
 {
        error_msg("gzip aborted\n");
-       exit(ERROR);
+       _exit(ERROR);
 }
 
 static void make_crc_table()
@@ -148,7 +149,8 @@ static void flush_window(void)
        }
 
        if (fwrite(window, 1, outcnt, out_file) != outcnt) {
-               error_msg_and_die("Couldnt write");
+               error_msg("Couldnt write");
+               _exit(EXIT_FAILURE);
        }
        bytes_out += (unsigned long) outcnt;
        outcnt = 0;