device_tree: fix compiler warnings (clang 5)
commit21a9ad2f159e4cafd090cc2b47ce322e024c7363
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Fri, 7 Apr 2017 22:20:14 +0000 (7 19:20 -0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 7 May 2017 06:57:51 +0000 (7 09:57 +0300)
treefbca156db6899b91aab9c89cd6af028617d45be3
parent6b1de1484ee2f80d5795358ea79e90c3ceb64167
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>
device_tree.c