summaryrefslogtreecommitdiffstats
path: root/ctl-lib
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-06-06 10:45:52 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-06-06 16:32:31 +0000
commit5b079d4c23228dc98998c5603e6a9aac07b04164 (patch)
tree8d4520e8456e5c08d5a3fea25082b78775db599a /ctl-lib
parentddd10be19eb13ad154af6d3effa6704f7de182fb (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>
Diffstat (limited to 'ctl-lib')
-rw-r--r--ctl-lib/ctl-action.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ctl-lib/ctl-action.c b/ctl-lib/ctl-action.c
index d8d5729..75ad551 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);