summaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-onload.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-05-14 15:08:31 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 15:02:54 +0100
commitc8676f0ef8f2e6eb8a21fd31541bbe7a611c8e45 (patch)
tree27bf59f5c7a3663036e0a364033ebc1b87490aa5 /ctl-lib/ctl-onload.c
parent777f6909df08215bf58d5901cdc155a3b56174c2 (diff)
Format
Change-Id: Ied901f39cd6814e5afd9811248b0a1fb401f3e76 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-onload.c')
-rw-r--r--ctl-lib/ctl-onload.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/ctl-lib/ctl-onload.c b/ctl-lib/ctl-onload.c
index 5455c8a..f319103 100644
--- a/ctl-lib/ctl-onload.c
+++ b/ctl-lib/ctl-onload.c
@@ -23,7 +23,7 @@
#include "ctl-config.h"
// onload section receive one action or an array of actions
-PUBLIC int OnloadConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *actionsJ) {
+int OnloadConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *actionsJ) {
// Load time parse actions in control file
if (actionsJ != NULL) {
@@ -31,14 +31,14 @@ PUBLIC int OnloadConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *a
if (!section->actions) {
AFB_ApiError (apiHandle, "OnloadConfig control fail processing onload actions");
- goto OnErrorExit;
+ return 1;
}
} else {
// Exec time process onload action now
if (!section->actions) {
AFB_ApiError (apiHandle, "OnloadConfig Cannot Exec Non Existing Onload Action");
- goto OnErrorExit;
+ return 1;
}
for (int idx=0; section->actions[idx].uid != NULL; idx ++) {
@@ -52,8 +52,4 @@ PUBLIC int OnloadConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *a
}
return 0;
-
-OnErrorExit:
- return 1;
-
}