diff options
author | Chris Robinson <[email protected]> | 2023-12-23 04:18:07 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-23 04:18:07 -0800 |
commit | cfb6bdfabfdf70ce5bcb650d356c3a9c1db3df0c (patch) | |
tree | 6776ebcdd9b5bac5812e97d580290e5ebd2676a7 /utils/makemhr/makemhr.cpp | |
parent | 4720b2c64d91facea24e8411c104770bd3763afa (diff) |
Avoid assignments in if conditions
Diffstat (limited to 'utils/makemhr/makemhr.cpp')
-rw-r--r-- | utils/makemhr/makemhr.cpp | 4 |
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; |