- 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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user