From 221f492dea22bbe0298d8748c0841e184c707eaf Mon Sep 17 00:00:00 2001 From: ketmar Date: Thu, 12 Dec 2013 19:32:08 +0200 Subject: [PATCH] test standalone: fixed bug with output --- src/main_unp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main_unp.c b/src/main_unp.c index fe30396..2438f2e 100644 --- a/src/main_unp.c +++ b/src/main_unp.c @@ -47,9 +47,7 @@ static int dot_count = -1; static int bread (void *buf, int buf_len, void *udata) { - int res = read(fdi, buf, buf_len); - if (res > 0) bytes_done += res; - return res; + return read(fdi, buf, buf_len); } @@ -107,7 +105,7 @@ int main (int argc, char *argv[]) { res = -1; break; } - bytes_total += rd; + bytes_done += rd; } free(wrbuf); pbar_clear(); -- 2.11.4.GIT