diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-06-06 10:45:52 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-06-29 19:38:23 +0200 |
commit | 29e2467a06ef7bd9373174245468497f9dd4a2a4 (patch) | |
tree | b4b67ea37ef50584bf787a4362770601325bde85 | |
parent | ede41d106ae6e13823d86babb129904da27bdd1e (diff) |
Remove an unnecessary variable
This variable was meant to save the result of a function call,
and be used into an 'if' statment. So, the function call was put
directly into the 'if' statment.
Bug-AGL: SPEC-1405
Change-Id: Ia352f5bbf310eadd91a19d80b813dc9f6d054028
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
-rw-r--r-- | ctl-lib/ctl-action.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ctl-lib/ctl-action.c b/ctl-lib/ctl-action.c index 24bfce6..f0a36c1 100644 --- a/ctl-lib/ctl-action.c +++ b/ctl-lib/ctl-action.c @@ -59,10 +59,8 @@ int ActionExecOne(CtlSourceT *source, CtlActionT* action, json_object *queryJ) { { json_object *returnJ, *toReturnJ; - json_type typeJ = json_object_get_type(queryJ); - if (action->argsJ) { - switch(typeJ) { + switch(json_object_get_type(queryJ)) { case json_type_object: { json_object_object_foreach(action->argsJ, key, val) { json_object_get(val); |