[PATCH] iconvdata: Use pending base character state in IBM1390, IBM1399 encoders

Andreas Schwab schwab@suse.de
Tue Nov 24 15:30:44 GMT 2026


On Nov 23 2026, JT Wang wrote:

> +# define TO_EMIT_SHIFT_TO_INIT						      \
> +  {									      \
> +    uint32_t pendc = (uint32_t) data->__statep->__count >> 7;		      \
> +    size_t need = pendc != 0						      \
> +	  ? ((data->__statep->__count & db) == 0 ? 4 : 3) : 1;		      \
> +    if (__glibc_unlikely ((size_t) (outend - outbuf) < need))		      \

"need" can be int and the cast is not needed.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de


More information about the Libc-alpha mailing list