]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
randutils: Remove unused rand_get_number
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sat, 28 Mar 2026 15:20:50 +0000 (16:20 +0100)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 15 Apr 2026 10:06:41 +0000 (12:06 +0200)
The function is not used anymore.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
include/randutils.h
lib/randutils.c

index a42af9813d4b473fd36bb26e21518b25c38f9d13..fb24497962953a470f904624ad3b37ee95a6f8e9 100644 (file)
@@ -9,9 +9,6 @@
 #define rand()         random()
 #endif
 
-/* rand() based */
-extern int rand_get_number(int low_n, int high_n);
-
 /* /dev/urandom based with fallback to rand() */
 extern int random_get_fd(void);
 extern int ul_random_get_bytes(void *buf, size_t nbytes);
index d6c56a5611ce9da1b88b71aad8ea5ec7538fa8d9..3697bf70a78521ddc762fd2428e74927f458dfa5 100644 (file)
@@ -46,11 +46,6 @@ static int getrandom(void *buf, size_t buflen, unsigned int flags)
 THREAD_LOCAL unsigned short ul_jrand_seed[3];
 #endif
 
-int rand_get_number(int low_n, int high_n)
-{
-       return rand() % (high_n - low_n + 1) + low_n;
-}
-
 static void crank_random(void)
 {
        int i;