]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
fixed off by one error
authorTobias Brunner <tobias@strongswan.org>
Thu, 4 Dec 2008 16:33:39 +0000 (16:33 -0000)
committerTobias Brunner <tobias@strongswan.org>
Thu, 4 Dec 2008 16:33:39 +0000 (16:33 -0000)
src/libstrongswan/utils/hashtable.c

index 37f37aa3a072f3999e66fc9e11e7df929c1ef3be..22ddeb1f45d6ab64e15a7d78bb461d2d019ce6c6 100644 (file)
@@ -152,7 +152,7 @@ static u_int get_nearest_powerof2(u_int n)
 {
        u_int i;
        --n;
-       for (--n, i = 1; i < sizeof(u_int) * 8; i <<= 1)
+       for (i = 1; i < sizeof(u_int) * 8; i <<= 1)
        {
                n |= n >> i;
        }