From 999631588da61b95f98e3355a733e1177078a3c1 Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Sat, 2 Mar 2013 13:11:30 +0100 Subject: [PATCH] closedir() only if opendir() succeeds Fix compiler warning: conf.c:186:3: warning: Null pointer passed as an argument to a 'nonnull' parameter closedir(d); ^ ~ --- libnfc/conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnfc/conf.c b/libnfc/conf.c index 4e19911..f28dd72 100644 --- a/libnfc/conf.c +++ b/libnfc/conf.c @@ -182,8 +182,8 @@ conf_devices_load(const char *dirname, nfc_context *context) } } } + closedir(d); } - closedir(d); } void