Module Name: src
Committed By: christos
Date: Wed Dec 2 02:04:06 UTC 2015
Modified Files:
src/external/bsd/ntp/dist/libntp: authkeys.c
Log Message:
Don't bother calling log for values <= 1... XXX: should use ilog() instead.
Fixes vax.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ntp/dist/libntp/authkeys.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/ntp/dist/libntp/authkeys.c
diff -u src/external/bsd/ntp/dist/libntp/authkeys.c:1.7 src/external/bsd/ntp/dist/libntp/authkeys.c:1.8
--- src/external/bsd/ntp/dist/libntp/authkeys.c:1.7 Fri Oct 23 14:06:19 2015
+++ src/external/bsd/ntp/dist/libntp/authkeys.c Tue Dec 1 21:04:06 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: authkeys.c,v 1.7 2015/10/23 18:06:19 christos Exp $ */
+/* $NetBSD: authkeys.c,v 1.8 2015/12/02 02:04:06 christos Exp $ */
/*
* authkeys.c - routines to manage the storage of authentication keys
@@ -236,7 +236,7 @@ auth_resize_hashtable(void)
symkey * sk;
totalkeys = authnumkeys + authnumfreekeys;
- hashbits = auth_log2(totalkeys / 4.0) + 1;
+ hashbits = (totalkeys <= 4 ? 0 : auth_log2(totalkeys / 4.0)) + 1;
hashbits = max(4, hashbits);
hashbits = min(15, hashbits);