]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib: bit_ceil_wrapul(): stop recursion
authorIker Pedrosa <ipedrosa@redhat.com>
Wed, 22 Feb 2023 09:54:28 +0000 (10:54 +0100)
committerSerge Hallyn <serge@hallyn.com>
Fri, 24 Feb 2023 18:44:14 +0000 (12:44 -0600)
It should call bit_ceilul() instead of itself.

Fixes: 0712b236c3bc ("Add bit manipulation functions")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
lib/bit.h

index d5b94dae6a58ea24d6b93cf13b6b1ddb4da47866..7f09eb4d5f3ebaa4724119965f8c8f74a0e5a8a4 100644 (file)
--- a/lib/bit.h
+++ b/lib/bit.h
@@ -39,7 +39,7 @@ bit_ceil_wrapul(unsigned long x)
        if (x == 0)
                return 0;
 
-       return bit_ceil_wrapul(x);
+       return bit_ceilul(x);
 }
 
 /* stdc_leading_zerosul(3) */