summaryrefslogtreecommitdiff
path: root/src/memtest.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-01-21 12:34:22 +0100
committerantirez <antirez@gmail.com>2013-01-21 12:34:22 +0100
commit93f61bb2a492cf008e353db951275ba0b12490dc (patch)
tree0b1d2bd28f8eccf7034c8527608f258910fa394f /src/memtest.c
parent442235fe40162632f3ac27b575b3fd11fc59a560 (diff)
downloadredis-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.c6
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);
}