[PATCH v5 08/17] string: Improve generic strchrnul
Richard Henderson
richard.henderson@linaro.org
Tue Jan 10 16:24:40 GMT 2023
On 1/10/23 06:18, Adhemerval Zanella Netto via Libc-alpha wrote:
> static __always_inline op_t
> check_mask (op_t word, uintptr_t s_int)
> {
> if (__BYTE_ORDER == __LITTLE_ENDIAN)
> return word >> (CHAR_BIT * (s_int % sizeof (s_int)));
> else
> return word << (CHAR_BIT * (s_int % sizeof (s_int)));
> }
sizeof(op_t), which is usually the same size, but doesn't have to be.
r~
More information about the Libc-alpha
mailing list