summaryrefslogtreecommitdiff
path: root/archival/bunzip2.c
diff options
context:
space:
mode:
authorGlenn L McGrath2003-10-29 03:37:54 +0000
committerGlenn L McGrath2003-10-29 03:37:54 +0000
commitf235d057735a0871cd9b096bbb0ede6d42643f79 (patch)
treef709d900e417eb7b6ceef03dcff6d897a73b5714 /archival/bunzip2.c
parent1c834407e39197d9d3f127d4783b75af5e793319 (diff)
downloadbusybox-f235d057735a0871cd9b096bbb0ede6d42643f79.zip
busybox-f235d057735a0871cd9b096bbb0ede6d42643f79.tar.gz
Use the return value from uncompress_bunzip, fix some typo
Diffstat (limited to 'archival/bunzip2.c')
-rw-r--r--archival/bunzip2.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/archival/bunzip2.c b/archival/bunzip2.c
index 4f231c9..191dda0 100644
--- a/archival/bunzip2.c
+++ b/archival/bunzip2.c
@@ -83,16 +83,13 @@ int bunzip2_main(int argc, char **argv)
dst_fd = bb_xopen(save_name, O_WRONLY | O_CREAT);
}
- if (uncompressStream(src_fd, dst_fd) == 0) {
- if (!(flags & bunzip_to_stdout)) {
- delete_name = argv[optind];
- }
- status = EXIT_SUCCESS;
- } else {
- if (!(flags & bunzip_to_stdout)) {
+ status = uncompressStream(src_fd, dst_fd);
+ if(!(flags & bunzip_to_stdout)) {
+ if (status) {
delete_name = save_name;
+ } else {
+ delete_name = argv[optind];
}
- status = EXIT_FAILURE;
}
if ((delete_name) && (unlink(delete_name) < 0)) {