Mercurial > hg > octave-lojdl > gnulib-hg
changeset 12117:fa148b84c9fd
hash: allow C89 compilation
* lib/hash.c (check_tuning): Move declaration before statement.
Reported by Reuben Thomas.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Mon, 05 Oct 2009 13:52:28 -0600 |
parents | e8a96a056df7 |
children | ef31ab094483 |
files | ChangeLog lib/hash.c |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-10-05 Eric Blake <ebb9@byu.net> + + hash: allow C89 compilation + * lib/hash.c (check_tuning): Move declaration before statement. + Reported by Reuben Thomas. + 2009-10-05 Karl Berry <karl@gnu.org> * doc/gnulib.texi: @include execvpe.texi, missing for several days.
--- a/lib/hash.c +++ b/lib/hash.c @@ -505,6 +505,7 @@ check_tuning (Hash_table *table) { const Hash_tuning *tuning = table->tuning; + float epsilon; if (tuning == &default_tuning) return true; @@ -513,7 +514,7 @@ fail to grow or shrink as they should. The smallest allocation is 11 (due to next_prime's algorithm), so an epsilon of 0.1 should be good enough. */ - float epsilon = 0.1f; + epsilon = 0.1f; if (epsilon < tuning->growth_threshold && tuning->growth_threshold < 1 - epsilon