aboutsummaryrefslogtreecommitdiff
path: root/string/memrchr.c
diff options
context:
space:
mode:
Diffstat (limited to 'string/memrchr.c')
-rw-r--r--string/memrchr.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/string/memrchr.c b/string/memrchr.c
index 0c8fd84901..86cd5b970c 100644
--- a/string/memrchr.c
+++ b/string/memrchr.c
@@ -96,15 +96,8 @@ MEMRCHR
The 1-bits make sure that carries propagate to the next 0-bit.
The 0-bits provide holes for carries to fall into. */
-
- if (sizeof (longword) != 4 && sizeof (longword) != 8)
- abort ();
-
-#if LONG_MAX <= LONG_MAX_32_BITS
- magic_bits = 0x7efefeff;
-#else
- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff;
-#endif
+ magic_bits = -1;
+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1;
/* Set up a longword, each of whose bytes is C. */
charmask = c | (c << 8);