diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-23 19:52:58 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-23 19:52:58 +0100 |
commit | ea129593d022d6edb9237f1888f1f7899a8c6f61 (patch) | |
tree | 84efa7d2955e005a4feb008ea36efece90387ae8 /uclient-fetch.c | |
parent | 07b4860975bd919fc8a8ce75d14ca8216eab70aa (diff) | |
download | uclient-ea129593d022d6edb9237f1888f1f7899a8c6f61.tar.gz |
uclient-fetch: fix progress bar initialization with -O-
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'uclient-fetch.c')
-rw-r--r-- | uclient-fetch.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/uclient-fetch.c b/uclient-fetch.c index d2ffde3..ebf49ae 100644 --- a/uclient-fetch.c +++ b/uclient-fetch.c @@ -115,7 +115,8 @@ static int open_output_file(const char *path, uint64_t resume_offset) if (!quiet) fprintf(stderr, "Writing to stdout\n"); - return STDOUT_FILENO; + ret = STDOUT_FILENO; + goto done; } } else { filename = uclient_get_url_filename(path, "index.html"); @@ -139,6 +140,7 @@ static int open_output_file(const char *path, uint64_t resume_offset) out_offset = resume_offset; out_bytes += resume_offset; +done: if (!quiet) { progress_init(&pmt, output_file); pmt_timer.cb = pmt_update; |