]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lib/glob: initialize back_str to silence uninitialized variable warning
authorJosh Law <objecting@objecting.org>
Thu, 12 Mar 2026 21:52:49 +0000 (21:52 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 28 Mar 2026 04:19:45 +0000 (21:19 -0700)
commitc9ba82624b684679b37c5062b697c85f932089b9
tree611d8629fb598ee9bd07fb7c78c7d61f4d7a0af9
parentd1db4118489fffd2b2f612140b7acbb477880839
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>
lib/glob.c