Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib: glob: replace bitwise OR with logical operation on boolean

Using bitwise OR (|=) on a boolean variable is valid C, but replacing it
with a direct logical assignment makes the intent clearer and appeases
strict static analysis tools.

Link: https://lkml.kernel.org/r/20260301152143.2572137-2-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>

authored by

Josh Law and committed by
Andrew Morton
33a3dd9b f5e74cbd

+2 -1
+2 -1
lib/glob.c
··· 96 96 class += 2; 97 97 /* Any special action if a > b? */ 98 98 } 99 - match |= (a <= c && c <= b); 99 + if (a <= c && c <= b) 100 + match = true; 100 101 } while ((a = *class++) != ']'); 101 102 102 103 if (match == inverted)