-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Closed
Description
in memtest.c, function memtest_progress_step (line 79)
for (j = 0; j < chars-progress_printed; j++) {
printf("%c",c);
progress_printed++;
}
I am not sure why we are incrementing progress_printed while progress_printed is also used in the for-loop predicate. I think the following should be enough:
for (j = 0; j < chars-progress_printed; j++) {
printf("%c",c);
}
progress_printed = chars
I tested both the old code and the new code on my machine and both seem work fine. It is interesting that the old code doesn't have a noticeable missing in output. I figured it might be because we are calling this function very frequently and the terminal window i have is not large enough.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels