diff --git a/src/spicelib/devices/csw/cswsetup.c b/src/spicelib/devices/csw/cswsetup.c index b66afee75..7b3e3405e 100644 --- a/src/spicelib/devices/csw/cswsetup.c +++ b/src/spicelib/devices/csw/cswsetup.c @@ -11,7 +11,7 @@ Author: 1985 Gordon Jacobs #define TSTALLOC(ptr, first, second) \ do { \ - if (!(here->ptr = SMPmakeElt(matrix, here->first, here->second))) \ + if ((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL) \ return E_NOMEM; \ } while (0) diff --git a/src/spicelib/devices/sw/swsetup.c b/src/spicelib/devices/sw/swsetup.c index 50972ae74..14e2baea7 100644 --- a/src/spicelib/devices/sw/swsetup.c +++ b/src/spicelib/devices/sw/swsetup.c @@ -12,7 +12,7 @@ Author: 1985 Gordon Jacobs #define TSTALLOC(ptr, first, second) \ do { \ - if (!(here->ptr = SMPmakeElt(matrix, here->first, here->second))) \ + if ((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL) \ return E_NOMEM; \ } while (0)