Replace the implicit 'bool' to 'int' conversion with an explicit ternary
operator. This makes the pointer arithmetic clearer and avoids relying on
boolean memory representation for logic flow.
Link: https://lkml.kernel.org/r/20260301203845.2617217-1-objecting@objecting.org
Signed-off-by: Josh Law <objecting@objecting.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
if (c == '\0') /* No possible match */
return false;
bool match = false, inverted = (*pat == '!');
- char const *class = pat + inverted;
+ char const *class = inverted ? pat + 1 : pat;
unsigned char a = *class++;
/*