From b6ecab3e3f87ac6a492b8596f421162aaa90b5e3 Mon Sep 17 00:00:00 2001 From: dwarning Date: Tue, 13 Jun 2023 19:23:07 +0200 Subject: [PATCH] Revert "ARRAY_OFFSET needed" This reverts commit c1ab187e86e0aadd3e47e5bf005d7fc852e0da3e. --- src/maths/sparse/spFactor.c | 2 +- src/maths/sparse/spOutput.c | 2 -- src/maths/sparse/spSMP.c | 2 +- src/maths/sparse/spUtils.c | 3 +-- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/maths/sparse/spFactor.c b/src/maths/sparse/spFactor.c index b950a26f2..c506150da 100644 --- a/src/maths/sparse/spFactor.c +++ b/src/maths/sparse/spFactor.c @@ -1845,7 +1845,7 @@ register int I, Size = Matrix->Size; register ElementPtr pElement; int NumberOfTies = 0; long Product, MinMarkowitzProduct; -ElementPtr ChosenPivot, pLargestElement = NULL; +ElementPtr ChosenPivot, pLargestElement; RealNumber Magnitude, LargestElementMag, Ratio, RatioOfAccepted = 0, LargestInCol; RealNumber FindLargestInCol(); diff --git a/src/maths/sparse/spOutput.c b/src/maths/sparse/spOutput.c index 450b2b5c6..1a823b634 100644 --- a/src/maths/sparse/spOutput.c +++ b/src/maths/sparse/spOutput.c @@ -159,8 +159,6 @@ int *PrintOrdToIntRowMap, *PrintOrdToIntColMap; SP_CALLOC( PrintOrdToIntColMap, int, Top + 1 ); if ( PrintOrdToIntRowMap == NULL OR PrintOrdToIntColMap == NULL) { Matrix->Error = spNO_MEMORY; - SP_FREE(PrintOrdToIntColMap); - SP_FREE(PrintOrdToIntRowMap); return; } for (I = 1; I <= Size; I++) diff --git a/src/maths/sparse/spSMP.c b/src/maths/sparse/spSMP.c index f11624013..0baf77373 100644 --- a/src/maths/sparse/spSMP.c +++ b/src/maths/sparse/spSMP.c @@ -431,10 +431,10 @@ SMPcDProd(SMPmatrix *Matrix, SPcomplex *pMantissa, int *pExponent) if (y < z) y = z; -#ifdef debug_print *pExponent = (int)(x + y); x = scalbn(re, (int) -y); z = scalbn(im, (int) -y); +#ifdef debug_print printf(" ** values are: re %g, im %g, y %g, re' %g, im' %g\n", re, im, y, x, z); #endif diff --git a/src/maths/sparse/spUtils.c b/src/maths/sparse/spUtils.c index 1afc3de79..9cb1eddcd 100644 --- a/src/maths/sparse/spUtils.c +++ b/src/maths/sparse/spUtils.c @@ -2192,8 +2192,7 @@ int Row, Col, Error; } else ABORT(); - if (Matrix != NULL) - Matrix->Error = spOKAY; + Matrix->Error = spOKAY; return; } #endif /* DOCUMENTATION */