Skip to content

Commit

Permalink
Remove ERRCHK macro (#3056)
Browse files Browse the repository at this point in the history
  • Loading branch information
JCGoran authored Aug 27, 2024
1 parent 4844029 commit 45a7e6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 7 additions & 5 deletions src/oc/fileio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions src/oc/hocdec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 45a7e6c

Please sign in to comment.