From 9c37970c9ac5037235d0c6123fb2b3ece0b493d0 Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Thu, 10 Oct 2019 15:09:28 +0200 Subject: Remove an unnecessary double pointer Remove an unnecessary double pointer in 'InternalHalHandleOneHalDependencies' function. BUG-AGL: SPEC-2884 Change-Id: I20e0b0d11288814322b3480a70b77df14a08564a Signed-off-by: Jonathan Aillet --- src/4a-internals-hal/4a-internals-hal-cb.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/4a-internals-hal/4a-internals-hal-cb.c b/src/4a-internals-hal/4a-internals-hal-cb.c index a81871c..bab3c8c 100644 --- a/src/4a-internals-hal/4a-internals-hal-cb.c +++ b/src/4a-internals-hal/4a-internals-hal-cb.c @@ -1084,21 +1084,17 @@ int InternalHalHandleInfoGetResponse(afb_api_t apiHandle, json_object *currentRe return ret; } -int InternalHalHandleOneHalDependencies(afb_api_t apiHandle, struct InternalHalProbedDevice **halDeviceToProbe) +int InternalHalHandleOneHalDependencies(afb_api_t apiHandle, struct InternalHalProbedDevice *currentDeviceToProbe) { int ret, toReturn = 0; - struct InternalHalProbedDevice *currentDeviceToProbe; - json_object *probedDeviceGetInfoResponseJ = NULL; - if(! apiHandle || ! halDeviceToProbe || ! *halDeviceToProbe) { + if(! apiHandle || ! currentDeviceToProbe) { AFB_API_ERROR(apiHandle, "Invalid argument(s)"); return -1; } - currentDeviceToProbe = *halDeviceToProbe; - if(! currentDeviceToProbe->uid || ! currentDeviceToProbe->requestedDeviceJ) { AFB_API_ERROR(apiHandle, "Specified device to probe is not valid (uid or request is not specified)"); @@ -1197,7 +1193,7 @@ int InternalHalHandleHalDependencies(afb_api_t apiHandle, } if(validatedDepedency) { - ret = InternalHalHandleOneHalDependencies(apiHandle, &halCurrentDeviceToProbe); + ret = InternalHalHandleOneHalDependencies(apiHandle, halCurrentDeviceToProbe); if(ret < 0) { AFB_API_ERROR(apiHandle, "Error %i happened when tried to handle device to probe with uid:'%s' and request:'%s'", -- cgit 1.2.3-korg