mirror of
https://github.com/qemu/qemu.git
synced 2024-11-23 19:03:38 +08:00
device_tree: fix compiler warnings (clang 5)
static code analyzer complain: device_tree.c:155:18: warning: Null pointer passed as an argument to a 'nonnull' parameter while ((de = readdir(d)) != NULL) { ^~~~~~~~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
6b1de1484e
commit
21a9ad2f15
@ -148,6 +148,7 @@ static void read_fstree(void *fdt, const char *dirname)
|
||||
d = opendir(dirname);
|
||||
if (!d) {
|
||||
error_setg(&error_fatal, "%s cannot open %s", __func__, dirname);
|
||||
return;
|
||||
}
|
||||
|
||||
while ((de = readdir(d)) != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user