hash: mark compute_bucket_size with the pure attribute
authorJim Meyering <meyering@redhat.com>
Tue, 29 Nov 2011 13:25:56 +0000 (14:25 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 29 Nov 2011 13:27:22 +0000 (14:27 +0100)
* lib/hash.c (compute_bucket_size): Use _GL_ATTRIBUTE_PURE.

ChangeLog
lib/hash.c

index dddd333..15118d9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-11-29  Jim Meyering  <meyering@redhat.com>
 
+       hash: mark compute_bucket_size with the pure attribute
+       * lib/hash.c (compute_bucket_size): Use _GL_ATTRIBUTE_PURE.
+
        quotearg, propername: correct pragma guard expression
        * lib/quotearg.c: Enable pragma for gcc-4.6 and newer, not 4.3 and newer.
        * lib/propername.c: Likewise.  Reported by Bernhard Voelker.
index a0e6416..1dd657a 100644 (file)
@@ -540,7 +540,7 @@ check_tuning (Hash_table *table)
    TUNING, or return 0 if there is no possible way to allocate that
    many entries.  */
 
-static size_t
+static size_t _GL_ATTRIBUTE_PURE
 compute_bucket_size (size_t candidate, const Hash_tuning *tuning)
 {
   if (!tuning->is_n_buckets)