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>2017-12-19 16:36:30 +0100
commit796889d6b3aff40b3247e263675ea28926bb97a0 (patch)
tree60c9d93122888457132268442a98a916f7c88965 /ctl-lib
parent646b950534bd6027738458f43cd83bf660c760f4 (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;