]> git.ipfire.org Git - thirdparty/linux.git/commit
lib/glob: clean up "bool abuse" in pointer arithmetic
authorJosh Law <objecting@objecting.org>
Sun, 1 Mar 2026 20:38:45 +0000 (20:38 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 28 Mar 2026 04:19:38 +0000 (21:19 -0700)
commit90c73d0bfa36ea80f3a55f5426daa46fa2795957
tree90809897364b5a5fcdaef0d245c931220a24be89
parent33a3dd9bfd410044225aa9f812102055d0e21d59
lib/glob: clean up "bool abuse" in pointer arithmetic

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>
lib/glob.c