Be more consistent about checking for errors from close()

This commit is contained in:
Eric Fischer
2016-12-06 17:19:22 -08:00
parent 94bebbd276
commit 72478ae13e
3 changed files with 16 additions and 3 deletions
+4 -1
View File
@@ -617,7 +617,10 @@ void readcsv(char *fn, std::vector<std::string> &header, std::map<std::string, s
}
}
fclose(f);
if (fclose(f) != 0) {
perror("fclose");
exit(EXIT_FAILURE);
}
}
int main(int argc, char **argv) {