diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2017-04-07 19:20:14 -0300 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2017-05-07 09:57:51 +0300 |
commit | 21a9ad2f159e4cafd090cc2b47ce322e024c7363 (patch) | |
tree | fbca156db6899b91aab9c89cd6af028617d45be3 /device_tree.c | |
parent | 6b1de1484ee2f80d5795358ea79e90c3ceb64167 (diff) |
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>
Diffstat (limited to 'device_tree.c')
-rw-r--r-- | device_tree.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/device_tree.c b/device_tree.c index 6e06320830..a24ddff02b 100644 --- a/device_tree.c +++ b/device_tree.c @@ -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) { |