From f4241ef7ea57e1f09119c98d5a438a0809f2f491 Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 26 Apr 2013 18:43:38 +0200 Subject: [PATCH] fix an incorrect typedef and cast which was of no consequence, because nobody made use of it. ancient, already in the very first commit of ngspice Date: Thu Apr 27 20:03:57 2000 +0000 --- src/include/ngspice/smpdefs.h | 2 +- src/maths/sparse/spsmp.c | 2 +- src/unsupported/cktsncom.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/include/ngspice/smpdefs.h b/src/include/ngspice/smpdefs.h index bae1ad37a..b49e4fff6 100644 --- a/src/include/ngspice/smpdefs.h +++ b/src/include/ngspice/smpdefs.h @@ -2,7 +2,7 @@ #define ngspice_SMPDEFS_H typedef struct MatrixFrame SMPmatrix; -typedef struct MatrixElement *SMPelement; +typedef struct MatrixElement SMPelement; /********** Copyright 1990 Regents of the University of California. All rights reserved. diff --git a/src/maths/sparse/spsmp.c b/src/maths/sparse/spsmp.c index 2d66a44a8..6816ca771 100644 --- a/src/maths/sparse/spsmp.c +++ b/src/maths/sparse/spsmp.c @@ -464,7 +464,7 @@ SMPfindElt(SMPmatrix *eMatrix, int Row, int Col, int CreateIfMissing) Col = Matrix->ExtToIntColMap[Col]; Element = Matrix->FirstInCol[Col]; Element = spcFindElementInCol(Matrix, &Element, Row, Col, CreateIfMissing); - return (SMPelement *)Element; + return Element; } /* XXX The following should probably be implemented in spUtils */ diff --git a/src/unsupported/cktsncom.c b/src/unsupported/cktsncom.c index 6fb4dafa3..e4bca95fa 100644 --- a/src/unsupported/cktsncom.c +++ b/src/unsupported/cktsncom.c @@ -32,7 +32,7 @@ CKTsenComp(CKTcircuit *ckt) double *elt; /* in smpdefs.h steht: -typedef struct MatrixElement *SMPelement; +typedef struct MatrixElement SMPelement; SMPelement * SMPfindElt( SMPmatrix *, int , int , int ); (die Fkt. steht in spsmp.c und gibt einen auf SMPelement * gecasteten Elementptr. zurück)