Skip to contentSkip to conversation

lib-glob-replace-bitwise-or-with-logical-operation-on-boolean.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Mar 28

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: lib: glob: replace bitwise OR with logical operation on boolean
has been removed from the -mm tree. Its filename was
lib-glob-replace-bitwise-or-with-logical-operation-on-boolean.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Josh Law <[email protected]>
Subject: lib: glob: replace bitwise OR with logical operation on boolean
Date: Sun, 1 Mar 2026 15:21:42 +0000

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.

---

 lib/glob.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/glob.c renamed from lib/glob.c~lib-glob-replace-bitwise-or-with-logical-operation-on-boolean +2 -1
@@ -96,7 +96,8 @@ bool __pure glob_match(char const *pat,
 					class += 2;
 					/* Any special action if a > b? */
 				}
-				match |= (a <= c && c <= b);
+				if (a <= c && c <= b)
+					match = true;
 			} while ((a = *class++) != ']');
 
 			if (match == inverted)

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-document-damos_commit_dests-failure-semantics.patch lib-maple_tree-fix-swapped-arguments-in-mas_safe_pivot-call.patch lib-idr-fix-ida_find_first_range-missing-ids-across-chunk-boundaries.patch