aboutsummaryrefslogtreecommitdiffstats
path: root/utils/makemhr/makemhr.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-23 04:18:07 -0800
committerChris Robinson <[email protected]>2023-12-23 04:18:07 -0800
commitcfb6bdfabfdf70ce5bcb650d356c3a9c1db3df0c (patch)
tree6776ebcdd9b5bac5812e97d580290e5ebd2676a7 /utils/makemhr/makemhr.cpp
parent4720b2c64d91facea24e8411c104770bd3763afa (diff)
Avoid assignments in if conditions
Diffstat (limited to 'utils/makemhr/makemhr.cpp')
-rw-r--r--utils/makemhr/makemhr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/makemhr/makemhr.cpp b/utils/makemhr/makemhr.cpp
index 2b6d04ce..f14110c0 100644
--- a/utils/makemhr/makemhr.cpp
+++ b/utils/makemhr/makemhr.cpp
@@ -342,9 +342,9 @@ static int StoreMhr(const HrirDataT *hData, const char *filename)
const uint n{hData->mIrPoints};
uint dither_seed{22222};
uint fi, ei, ai, i;
- FILE *fp;
- if((fp=fopen(filename, "wb")) == nullptr)
+ FILE *fp{fopen(filename, "wb")};
+ if(!fp)
{
fprintf(stderr, "\nError: Could not open MHR file '%s'.\n", filename);
return 0;