aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-03-14 01:00:26 +0100
committerMattias Andrée <maandree@kth.se>2016-03-14 01:00:26 +0100
commite949bf64e01c9a2de41eb3a4479db0e58cd4caa6 (patch)
treea635773c346579349c895fc526a68bcbdcf7c429 /src
parentCleaner workaround for clang bug (diff)
downloadlibzahl-e949bf64e01c9a2de41eb3a4479db0e58cd4caa6.tar.gz
libzahl-e949bf64e01c9a2de41eb3a4479db0e58cd4caa6.tar.bz2
libzahl-e949bf64e01c9a2de41eb3a4479db0e58cd4caa6.tar.xz
Fix so that no workaround is required.
Thanks to Alexis Megas. Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src')
-rw-r--r--src/allocator.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/allocator.c b/src/allocator.c
index e75546f..44f7985 100644
--- a/src/allocator.c
+++ b/src/allocator.c
@@ -5,11 +5,6 @@
void
libzahl_realloc(z_t a, size_t need)
{
-#if defined(__clang__) /* https://llvm.org/bugs/show_bug.cgi?id=26930 */
- volatile size_t j;
-#else
-# define j i
-#endif
size_t i, x;
zahl_char_t *new;
@@ -18,7 +13,7 @@ libzahl_realloc(z_t a, size_t need)
need |= need >> 1;
need |= need >> 2;
need |= need >> 4;
- for (j = sizeof(need), x = 8; j; j >>= 1, x <<= 1)
+ for (i = sizeof(need), x = 8; (i >>= 1); x <<= 1)
need |= need >> x;
need += 1;
}