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: initialize back_str to silence uninitialized variable warning

back_str is only used when back_pat is non-NULL, and both are always set
together, so it is safe in practice. Initialize back_str to NULL to make
this safety invariant explicit and silence compiler/static analysis
warnings.

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

authored by

Josh Law and committed by
Andrew Morton
c9ba8262 d1db4118

+1 -1
+1 -1
lib/glob.c
··· 47 47 * (no exception for /), it can be easily proved that there's 48 48 * never a need to backtrack multiple levels. 49 49 */ 50 - char const *back_pat = NULL, *back_str; 50 + char const *back_pat = NULL, *back_str = NULL; 51 51 52 52 /* 53 53 * Loop over each token (character or class) in pat, matching