From 45a7e6cf5eacf7190f21c070899da75f2db567b5 Mon Sep 17 00:00:00 2001 From: JCGoran Date: Tue, 27 Aug 2024 15:04:04 +0200 Subject: [PATCH] Remove `ERRCHK` macro (#3056) --- src/oc/fileio.cpp | 12 +++++++----- src/oc/hocdec.h | 2 -- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/oc/fileio.cpp b/src/oc/fileio.cpp index 455d0220a1..8b59284e79 100644 --- a/src/oc/fileio.cpp +++ b/src/oc/fileio.cpp @@ -91,14 +91,16 @@ void wopen(void) /* open file for writing */ else fname = ""; d = 1.; - if (fout != stdout) - ERRCHK(IGNORE(fclose(fout));) + if (fout != stdout) { + IGNORE(fclose(fout)); + } fout = stdout; - if (fname[0] != 0) - ERRCHK(if ((fout = fopen(expand_env_var(fname), "w")) == (FILE*) 0) { + if (fname[0] != 0) { + if ((fout = fopen(expand_env_var(fname), "w")) == nullptr) { d = 0.; fout = stdout; - }) + } + } errno = 0; ret(); pushx(d); diff --git a/src/oc/hocdec.h b/src/oc/hocdec.h index ab4d553bed..a8f5b31826 100644 --- a/src/oc/hocdec.h +++ b/src/oc/hocdec.h @@ -276,8 +276,6 @@ int ilint; #endif using neuron::Sprintf; -#define ERRCHK(c1) c1 - // No longer used because of clang format difficulty // #define IFGUI if (hoc_usegui) { // #define ENDGUI }