From 9c267b851e54441b867293973fd5a898b847df39 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 12 Oct 2006 20:06:18 +0000 Subject: style fixes --- archival/gunzip.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'archival/gunzip.c') diff --git a/archival/gunzip.c b/archival/gunzip.c index 396ce4f5c..e24401c71 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c @@ -65,9 +65,8 @@ int gunzip_main(int argc, char **argv) optind = argc; /* we don't handle "gunzip - a.gz b.gz" */ } else { src_fd = xopen(old_path, O_RDONLY); - /* Get the time stamp on the input file. */ - xstat(old_path, &stat_buf); + fstat(src_fd, &stat_buf); } /* Check that the input is sane. */ @@ -131,11 +130,11 @@ int gunzip_main(int argc, char **argv) } else if (ENABLE_DESKTOP && (opt & GUNZIP_OPT_VERBOSE)) { fprintf(stderr, "%s: %u%% - replaced with %s\n", - // TODO: LARGEFILE support for stat_buf.st_size? old_path, (unsigned)(stat_buf.st_size*100 / (status+1)), new_path); } } else { - bb_error_msg("invalid magic"); exitcode = 1; + bb_error_msg("invalid magic"); + exitcode = 1; } if (status < 0 && new_path) { /* Unzip failed, remove new path instead of old path */ -- cgit v1.2.3