From 2ec1214fac0d562c2ced1bb9e1ea309dbf4e51f9 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 3 Nov 2019 11:50:28 +0100 Subject: [PATCH] remove VS 'assignment within conditional expression' warning --- src/spicelib/devices/csw/cswsetup.c | 2 +- src/spicelib/devices/sw/swsetup.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)