changeset 16132:46ec538d9591

hash: mark compute_bucket_size with the pure attribute * lib/hash.c (compute_bucket_size): Use _GL_ATTRIBUTE_PURE.
author Jim Meyering <meyering@redhat.com>
date Tue, 29 Nov 2011 14:25:56 +0100
parents 732c22001112
children a9ad59bfff25
files ChangeLog lib/hash.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -540,7 +540,7 @@
    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)