Whamcloud - gitweb
misc/create_inode: simplify logic in scandir()
authorEric Biggers <ebiggers@google.com>
Sat, 21 Jan 2023 20:32:20 +0000 (12:32 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 27 Jan 2023 17:38:31 +0000 (12:38 -0500)
commiteb5ebbc777023f7172b9ce4338dfe816eb4b1aa3
tree85de7f25e82858f9c3bc94ba2bcf965e8f208163
parenta075bf746427810c4aab2be5d3852b10ce5dc3f1
misc/create_inode: simplify logic in scandir()

The control flow in scandir() (only used on Windows) confuses gcc into
thinking that *name_list is not always set on success, which causes a
-Wmaybe-uninitialized warning in __populate_fs().  As far as I can tell
it's a false positive; however, avoid it by cleanly separating the
success and failure cases in scandir().

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/create_inode.c