aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:54:13 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:54:13 +0100
commit7eba3c57c97aa4cae102f4f13eaa1cfa939719c7 (patch)
tree715aef0a1fbf1d1fba640e89e88db28f773b92c7
parent9242abc75aab5baf04fc07175f3301ac7dbb8e4b (diff)
Fix warning compile about uninitialized variable
Change-Id: I5b07409a7d7c9b5e038accb973b3232775e40c23 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--ctl-lib/ctl-plugin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctl-lib/ctl-plugin.c b/ctl-lib/ctl-plugin.c
index be3cf67..986512f 100644
--- a/ctl-lib/ctl-plugin.c
+++ b/ctl-lib/ctl-plugin.c
@@ -81,7 +81,7 @@ STATIC int DispatchOneL2c(void* luaState, char *funcname, Lua2cFunctionT callbac
}
STATIC int PluginLoadOne (AFB_ApiT apiHandle, CtlPluginT *ctlPlugin, json_object *pluginJ, void* handle) {
- json_object *lua2csJ = NULL;
+ json_object *lua2csJ = NULL, *pluginPathJ = NULL;
const char*ldSearchPath = NULL, *basename = NULL;
void *dlHandle;
@@ -107,7 +107,7 @@ STATIC int PluginLoadOne (AFB_ApiT apiHandle, CtlPluginT *ctlPlugin, json_object
if (!ldSearchPath) ldSearchPath = CONTROL_PLUGIN_PATH;
// search for default policy config file
- json_object *pluginPathJ = ScanForConfig(ldSearchPath, CTL_SCAN_RECURSIVE, basename, CTL_PLUGIN_EXT);
+ pluginPathJ = ScanForConfig(ldSearchPath, CTL_SCAN_RECURSIVE, basename, CTL_PLUGIN_EXT);
if (!pluginPathJ || json_object_array_length(pluginPathJ) == 0) {
AFB_ApiError(apiHandle, "CTL-PLUGIN-LOADONE Missing plugin=%s*%s (config ldpath?) search=\n-- %s", basename, CTL_PLUGIN_EXT, ldSearchPath);
goto OnErrorExit;