aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-06-06 10:45:52 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 15:02:55 +0100
commit91318128419fe5db345f6e00bb8e68a413f967c7 (patch)
tree8d4520e8456e5c08d5a3fea25082b78775db599a
parente7f128f5283604b6adc71d8f5c29e1b54c6025ed (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.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);