Oops, checking for the wrong expected return value

This commit is contained in:
Erica Fischer
2024-07-30 15:38:16 -07:00
parent 43e5b6147e
commit 6a6ec0c038
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -2232,7 +2232,7 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
estimated_complexity = geompos;
fflush(geomfile);
if (pwrite(fileno(geomfile), &estimated_complexity, sizeof(estimated_complexity), 0) != 0) {
if (pwrite(fileno(geomfile), &estimated_complexity, sizeof(estimated_complexity), 0) != sizeof(estimated_complexity)) {
perror("pwrite estimated complexity");
exit(EXIT_WRITE);
}