From c5cc5f20c969b957f48f0a1420d5bab216c62c1f Mon Sep 17 00:00:00 2001 From: David Hall Date: Wed, 16 Oct 2019 09:42:25 -0500 Subject: [PATCH] MCOL-3518 Set number of decimals for regr_avgx and regr_avgy in init. --- utils/regr/regrmysql.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/utils/regr/regrmysql.cpp b/utils/regr/regrmysql.cpp index 2570163f1..a27d94a67 100644 --- a/utils/regr/regrmysql.cpp +++ b/utils/regr/regrmysql.cpp @@ -167,14 +167,10 @@ extern "C" strcpy(message,"regr_avgx() with a non-numeric independant (second) argument"); return 1; } - if (args->arg_type[1] == DECIMAL_RESULT && initid->decimals != DECIMAL_NOT_SPECIFIED) + if (initid->decimals != DECIMAL_NOT_SPECIFIED) { initid->decimals += 4; } - else - { - initid->decimals = DECIMAL_NOT_SPECIFIED; - } if (!(data = (struct regr_avgx_data*) malloc(sizeof(struct regr_avgx_data)))) { @@ -275,14 +271,10 @@ extern "C" return 1; } - if (args->arg_type[0] == DECIMAL_RESULT && initid->decimals != DECIMAL_NOT_SPECIFIED) + if (initid->decimals != DECIMAL_NOT_SPECIFIED) { initid->decimals += 4; } - else - { - initid->decimals = DECIMAL_NOT_SPECIFIED; - } if (!(data = (struct regr_avgy_data*) malloc(sizeof(struct regr_avgy_data)))) {