From 4ea92b056bc6932b8eae57b53181e33dce2c2337 Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Thu, 18 Apr 2019 16:42:08 +0200 Subject: Rename misnamed var in values changing function Rename misnamed variable in function used to change ALSA values using percentage. BUG-AGL: SPEC-2329 Change-Id: I7ba630f591d0d1af0c7f021002493a80817b27a1 Signed-off-by: Jonathan Aillet --- .../4a-hal-controllers-value-handler.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to '4a-hal') diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-value-handler.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-value-handler.c index 74d0fdd..4e9b56d 100644 --- a/4a-hal/4a-hal-controllers/4a-hal-controllers-value-handler.c +++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-value-handler.c @@ -272,7 +272,7 @@ int HalCtlsChangePreviousValuesUsingJson(afb_api_t apiHandle, json_object *previousControlValuesJ, json_object **ChangedJ) { - int requestedPercentageVariation, requestedeVariation, toChangeValue, changedValue, idx, count; + int requestedPercentageVariation, requestedVariation, toChangeValue, changedValue, idx, count; char *requestedPercentageVariationString, *conversionEnd; @@ -307,11 +307,11 @@ int HalCtlsChangePreviousValuesUsingJson(afb_api_t apiHandle, return -3; } - requestedeVariation = HalCtlsConvertPercentageToValue((int) abs(requestedPercentageVariation), - alsaCtlProperties->minval, - alsaCtlProperties->maxval); + requestedVariation = HalCtlsConvertPercentageToValue((int) abs(requestedPercentageVariation), + alsaCtlProperties->minval, + alsaCtlProperties->maxval); - if(requestedeVariation == -INT_MAX) { + if(requestedVariation == -INT_MAX) { AFB_API_ERROR(apiHandle, "Didn't succeed to convert %i (using min %i et max %i)", requestedPercentageVariation, @@ -321,7 +321,7 @@ int HalCtlsChangePreviousValuesUsingJson(afb_api_t apiHandle, } if(requestedPercentageVariation < 0) - requestedeVariation = -requestedeVariation; + requestedVariation = -requestedVariation; count = (int) json_object_array_length(previousControlValuesJ); @@ -339,12 +339,12 @@ int HalCtlsChangePreviousValuesUsingJson(afb_api_t apiHandle, toChangeValue = json_object_get_int(toChangeObjectJ); - if((toChangeValue + requestedeVariation) < alsaCtlProperties->minval) + if((toChangeValue + requestedVariation) < alsaCtlProperties->minval) changedValue = alsaCtlProperties->minval; - else if((toChangeValue + requestedeVariation) > alsaCtlProperties->maxval) + else if((toChangeValue + requestedVariation) > alsaCtlProperties->maxval) changedValue = alsaCtlProperties->maxval; else - changedValue = toChangeValue + requestedeVariation; + changedValue = toChangeValue + requestedVariation; json_object_array_put_idx(changedArrayJ, idx, json_object_new_int(changedValue)); } -- cgit 1.2.3-korg