From 44a5882bc2fd070dc3fe34b2da779ec21dd2c98f Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 30 Jan 2024 23:27:14 +0900 Subject: [PATCH] string.c (mrb_memsearch_ss): remove useless alignment adjustment Ref #6158 --- src/string.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/string.c b/src/string.c index 1c46a9843..bafb31a56 100644 --- a/src/string.c +++ b/src/string.c @@ -600,17 +600,6 @@ mrb_memsearch_ss(const unsigned char *xs, long m, const unsigned char *ys, long #define MASK4 0x80 #endif -#if ALIGNED_WORD_ACCESS - if ((uintptr_t)ys % sizeof(bitint)) { - int l = sizeof(bitint) - (bitint)ys % sizeof(bitint); - const unsigned char *p = (unsigned char*)memchr(ys, *xs, l); - if (p && (p - ys) < m) { - if (memcmp(p, xs, m) == 0) return (mrb_int)(p - ys); - ys = p; - } - } -#endif - const bitint first = MASK1 * (uint8_t)xs[0]; const bitint last = MASK1 * (uint8_t)xs[m-1];