From: Eric Blake Date: Mon, 5 Oct 2009 19:52:28 +0000 (-0600) Subject: hash: allow C89 compilation X-Git-Tag: v0.1~5370 X-Git-Url: https://erislabs.net/gitweb/?a=commitdiff_plain;h=ad82c2fb130fbf3bfd3f7f9aa60e99a19ff9d396;p=gnulib.git hash: allow C89 compilation * lib/hash.c (check_tuning): Move declaration before statement. Reported by Reuben Thomas. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 5fbcc259c..e3b25c6fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-10-05 Eric Blake + + hash: allow C89 compilation + * lib/hash.c (check_tuning): Move declaration before statement. + Reported by Reuben Thomas. + 2009-10-05 Karl Berry * doc/gnulib.texi: @include execvpe.texi, missing for several days. diff --git a/lib/hash.c b/lib/hash.c index cc6ebb322..3ab7136be 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -505,6 +505,7 @@ static bool check_tuning (Hash_table *table) { const Hash_tuning *tuning = table->tuning; + float epsilon; if (tuning == &default_tuning) return true; @@ -513,7 +514,7 @@ check_tuning (Hash_table *table) 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