flashcp: trivial code shrink

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2013-01-28 12:26:29 +01:00
parent 17d4436424
commit 6be6f3bfec

View File

@ -33,7 +33,7 @@ static void progress(int mode, uoff_t count, uoff_t total)
if (total)
percent = (unsigned) (percent / total);
printf("\r%s: %"OFF_FMT"u/%"OFF_FMT"u (%u%%) ",
(mode == -1) ? "Erasing block" : ((mode == 0) ? "Writing kb" : "Verifying kb"),
(mode < 0) ? "Erasing block" : ((mode == 0) ? "Writing kb" : "Verifying kb"),
count, total, (unsigned)percent);
fflush_all();
}