Commit 21a9ad2f authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Michael Tokarev

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: 's avatarPhilippe Mathieu-Daudé <>
Reviewed-by: 's avatarMarc-André Lureau <>
Signed-off-by: 's avatarMichael Tokarev <>
parent 6b1de148
......@@ -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);
while ((de = readdir(d)) != NULL) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment