]> granicus.if.org Git - sudo/commitdiff
Only use max_wait if it is non-zero
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 18 Sep 2009 14:53:51 +0000 (14:53 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 18 Sep 2009 14:53:51 +0000 (14:53 +0000)
sudoreplay.c

index 9228cfcd9167a5460aa4d3fbe7ce09c494a91368..60d377b23f59d9ef7f4c3a196e56efa9f577f95f 100644 (file)
@@ -285,7 +285,7 @@ main(argc, argv)
 
        /* Adjust delay using speed factor and clamp to max_wait */
        to_wait = seconds / speed;
-       if (to_wait > max_wait)
+       if (max_wait && to_wait > max_wait)
            to_wait = max_wait;
        delay(to_wait);