[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] hash: mark compute_bucket_size with the pure attribute
From: |
Jim Meyering |
Subject: |
[PATCH] hash: mark compute_bucket_size with the pure attribute |
Date: |
Tue, 29 Nov 2011 14:29:00 +0100 |
One more:
>From 908690cb743e69c73b42ae310807b29800c8764b Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 29 Nov 2011 14:25:56 +0100
Subject: [PATCH] hash: mark compute_bucket_size with the pure attribute
* lib/hash.c (compute_bucket_size): Use _GL_ATTRIBUTE_PURE.
---
ChangeLog | 3 +++
lib/hash.c | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dddd333..15118d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2011-11-29 Jim Meyering <address@hidden>
+ 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.
diff --git a/lib/hash.c b/lib/hash.c
index a0e6416..1dd657a 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -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)
--
1.7.8.rc3.31.g017d1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] hash: mark compute_bucket_size with the pure attribute,
Jim Meyering <=