diff options
author | Bernhard Reutner-Fischer | 2006-04-12 17:55:51 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2006-04-12 17:55:51 +0000 |
commit | dac7ff15b7d32deeeef3d9665744fc5774c21d70 (patch) | |
tree | 0e4c34863628d79fdad0c6217f4deb0ca0a91c33 /archival | |
parent | 79865bc5077cf6d17b27e9599921d4c85b1575fd (diff) | |
download | busybox-dac7ff15b7d32deeeef3d9665744fc5774c21d70.zip busybox-dac7ff15b7d32deeeef3d9665744fc5774c21d70.tar.gz |
- patch from Denis Vlasenko to add and use bb_xsocket() and to use
bb_xopen some more while at it.
Also use shorter boilerplate while at it.
Diffstat (limited to 'archival')
-rw-r--r-- | archival/gzip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/archival/gzip.c b/archival/gzip.c index 41ed3a2..5fb1187 100644 --- a/archival/gzip.c +++ b/archival/gzip.c @@ -1228,8 +1228,8 @@ int gzip_main(int argc, char **argv) inFileNum = STDIN_FILENO; outFileNum = STDOUT_FILENO; } else { - inFileNum = open(argv[i], O_RDONLY); - if (inFileNum < 0 || fstat(inFileNum, &statBuf) < 0) + inFileNum = bb_xopen(argv[i], O_RDONLY); + if (fstat(inFileNum, &statBuf) < 0) bb_perror_msg_and_die("%s", argv[i]); time_stamp = statBuf.st_ctime; ifile_size = statBuf.st_size; |