hash: allow C89 compilation
authorEric Blake <ebb9@byu.net>
Mon, 5 Oct 2009 19:52:28 +0000 (13:52 -0600)
committerEric Blake <ebb9@byu.net>
Tue, 6 Oct 2009 00:39:23 +0000 (18:39 -0600)
* lib/hash.c (check_tuning): Move declaration before statement.
Reported by Reuben Thomas.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/hash.c

index 5fbcc25..e3b25c6 100644 (file)
--- 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.
index cc6ebb3..3ab7136 100644 (file)
@@ -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