always cap first print_crypt_status to less or equal 1 second.
[tfcrypt.git] / tfc_skein.c
index 3f656696a01a9029bf2f18419feda61b058ab5d6..8102f70af122cff0cbeb7055150ea83267238494 100644 (file)
@@ -222,7 +222,7 @@ _dothat:
                                continue;
                        }
 
-                       if (status_timer) setup_next_alarm(status_timer);
+                       if (status_timer) setup_next_alarm(status_timer > 1000000 ? 1000000 : status_timer);
                        if (skeinfd(hash, bits, mackey_opt ? mackey : NULL, fd, iseek, maxlen) != YES) {
                                xerror(YES, NO, YES, "%s", fname);
                                exitcode = 1;
@@ -274,7 +274,7 @@ _dothat:
                        continue;
                }
 
-_dohash:       if (status_timer) setup_next_alarm(status_timer);
+_dohash:       if (status_timer) setup_next_alarm(status_timer > 1000000 ? 1000000 : status_timer);
                if (skeinfd(hash, bits, mackey_opt ? mackey : NULL, fd, iseek, maxlen) != YES) {
                        xerror(YES, NO, YES, "%s", fargv[x]);
                        exitcode = 1;