From: Tobias Brunner Date: Thu, 22 Sep 2011 15:59:17 +0000 (+0200) Subject: Easier to understand test for soft dependencies in dependencies_satisfied. X-Git-Tag: 4.6.0~172 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=076aa51fc9f9a14b90a0dea4ecbb9278976599f1;p=thirdparty%2Fstrongswan.git Easier to understand test for soft dependencies in dependencies_satisfied. --- diff --git a/src/libstrongswan/plugins/plugin_loader.c b/src/libstrongswan/plugins/plugin_loader.c index ecd1d718f1..462ba7047a 100644 --- a/src/libstrongswan/plugins/plugin_loader.c +++ b/src/libstrongswan/plugins/plugin_loader.c @@ -231,7 +231,6 @@ static bool feature_loaded(private_plugin_loader_t *this, plugin_entry_t *entry, /** * Check if dependencies are satisfied */ - static bool dependencies_satisfied(private_plugin_loader_t *this, char *name, bool soft, bool report, plugin_feature_t *features, int count) { @@ -266,7 +265,7 @@ static bool dependencies_satisfied(private_plugin_loader_t *this, char *name, } entries->destroy(entries); - if (!found && !(features[i].kind == FEATURE_SDEPEND && !soft)) + if (!found && (features[i].kind != FEATURE_SDEPEND || soft)) { if (report) {