summaryrefslogtreecommitdiffstats
path: root/ctl-lib
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:54:13 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 15:02:54 +0100
commit9572090197ac23cf8a8ec3538a5e15e7597d5901 (patch)
tree715aef0a1fbf1d1fba640e89e88db28f773b92c7 /ctl-lib
parente78269bae9dee5f483ce5d47115e8bae267fadc3 (diff)
Fix warning compile about uninitialized variable
Change-Id: I5b07409a7d7c9b5e038accb973b3232775e40c23 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib')
-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;