On Sun, Jan 25, 2026 at 03:54:56PM +0100, Alejandro Colomar wrote: > Hi Greg, > > On Sun, Jan 25, 2026 at 03:29:56PM +0100, Greg KH wrote: > > On Sun, Jan 25, 2026 at 02:49:16PM +0100, Alejandro Colomar via Mutt-dev > > wrote: > > > On Sun, Jan 25, 2026 at 06:30:23PM +0800, Kevin J. McCarthy wrote: > > [...] > > > > > - PREV->content->length = loc - PREV->content->offset - 1; > > > > + PREV->content->length = loc - PREV->content->offset - > > > > + (has_mbox_sep ? 1 : 0); > > > > > > You may want to simplify as > > > > > > PREV->content->length = loc - PREV->content->offset - !!has_mbox_sep; > > > > Doing an integer operation on a boolean value is "tricky" for the C > > standard from what I recall. > > !! returns an int, not a bool. While '!!' is informally known as > "the cast-to-bool operator", a more appropriate name would be > "the cast-to-bool-then-int operator", and indeed, it is equivalent to > > (int)(bool) x; > > Being an int, it shouldn't be tricky at all.
Ah, ok, totally missed that as I always knew it by the informal name, which implied a bool. thanks, greg k-h
