Re: [PATCH v6 02/19] string: Add strprefix()
From: Joe Perches
Date: Sat Nov 14 2026 - 13:24:54 EST
On Sat, 2026-11-14 at 17:59 +0100, Alejandro Colomar wrote:
> > A negative of this is that it implies the return should
> > always be tested even though it can be known that the
> > return is effectively bool.
>
> I'm not sure I follow. The attribute is about the arguments, not the
> return value. Perhaps I don't understand what you mean by "this".
'this' is the return of the strprefix function itself.
It returns either a const char * or a char * or NULL.
Because it can return NULL, then the return value
could/should be tested.