summaryrefslogtreecommitdiffstats
path: root/commands/timeout.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/timeout.c')
-rw-r--r--commands/timeout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/timeout.c b/commands/timeout.c
index 5368bc4427..aae0f73342 100644
--- a/commands/timeout.c
+++ b/commands/timeout.c
@@ -73,7 +73,7 @@ static int do_timeout(cmd_tbl_t *cmdtp, int argc, char *argv[])
if (!(flags & TIMEOUT_SILENT))
printf("%2d", countdown--);
- while (!is_timeout(start, timeout * SECOND)) {
+ do {
if (tstc()) {
int key = getc();
if (flags & TIMEOUT_CTRLC && key == 3)
@@ -87,7 +87,7 @@ static int do_timeout(cmd_tbl_t *cmdtp, int argc, char *argv[])
printf("\b\b%2d", countdown--);
second += SECOND;
}
- }
+ } while (!is_timeout(start, timeout * SECOND));
ret = 0;
out: