On Wed, Feb 18, 2026 at 09:58:24PM +0000, Crystal Kolipe via Mutt-dev wrote:
> On Wed, Feb 18, 2026 at 03:29:57PM +0100, Alejandro Colomar via Mutt-dev 
> wrote:
> >     #define isspace_c(c)            (!streq(strchrnul(MUTT_CTYPE_SPACE_C, 
> > c), ""))
> >     #define isspace_rfc5322_fws(c)  
> > (!streq(strchrnul(MUTT_CTYPE_RFC5322_FWS, c), ""))

> Note that strchrnul() is not available natively on OpenBSD.

I do not understand why strchrnul and strcmp are even being invoked here.

Yes, strchrnul(str,c) will be not equal to "" iff c is in the string, and
yes the C compiler will probably optimize out the strcmp call, but isn't

NULL != strchr(str,c) 

easier and shorter?  (And apparently more portable.)

imc

Reply via email to