]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Refactor delay_for function signature to use const struct timeval
authorjNullj <15849761+jNullj@users.noreply.github.com>
Mon, 6 May 2024 21:30:27 +0000 (00:30 +0300)
committerjNullj <15849761+jNullj@users.noreply.github.com>
Mon, 6 May 2024 21:30:27 +0000 (00:30 +0300)
delay_for does not change delay.
Hint about that using const.
This allows for usage of const delay and improves readability.

term-utils/scriptreplay.c

index 197e3e7e91dfca0a3eb664ee6499deb58d4f88f8..ab3581eed0095da4d60b7ebff4e8d5eee0dbcd62 100644 (file)
@@ -88,7 +88,7 @@ getnum(const char *s)
 }
 
 static void
-delay_for(struct timeval *delay)
+delay_for(const struct timeval *delay)
 {
 #ifdef HAVE_NANOSLEEP
        struct timespec ts, remainder;