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);
  ^        ~
This commit is contained in:
Ludovic Rousseau 2013-03-02 13:11:30 +01:00
parent aee56b9255
commit 999631588d

View file

@ -182,8 +182,8 @@ conf_devices_load(const char *dirname, nfc_context *context)
}
}
}
closedir(d);
}
closedir(d);
}
void