From 5b079d4c23228dc98998c5603e6a9aac07b04164 Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Wed, 6 Jun 2018 10:45:52 +0200 Subject: 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 --- ctl-lib/ctl-action.c | 4 +--- 1 file changed, 1 insertion(+), 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); -- cgit 1.2.3-korg