diff options
author | antirez <antirez@gmail.com> | 2013-01-21 12:34:22 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2013-01-21 12:34:22 +0100 |
commit | 93f61bb2a492cf008e353db951275ba0b12490dc (patch) | |
tree | 0b1d2bd28f8eccf7034c8527608f258910fa394f /src/memtest.c | |
parent | 442235fe40162632f3ac27b575b3fd11fc59a560 (diff) | |
download | redis-93f61bb2a492cf008e353db951275ba0b12490dc.tar.gz |
Fixed a bug in memtest progress bar, that had no actual effects.
This closes issue #859, thanks to @erbenmo.
Diffstat (limited to 'src/memtest.c')
-rw-r--r-- | src/memtest.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/memtest.c b/src/memtest.c index 754d02024..cabfb5c89 100644 --- a/src/memtest.c +++ b/src/memtest.c @@ -79,10 +79,8 @@ void memtest_progress_end(void) { void memtest_progress_step(size_t curr, size_t size, char c) { size_t chars = ((unsigned long long)curr*progress_full)/size, j; - for (j = 0; j < chars-progress_printed; j++) { - printf("%c",c); - progress_printed++; - } + for (j = 0; j < chars-progress_printed; j++) printf("%c",c); + progress_printed = chars; fflush(stdout); } |