Commit e31f179a authored by Andreas Schuh's avatar Andreas Schuh

Fix up use of SafeFOpen.

parent 6b7be9a0
......@@ -997,7 +997,7 @@ static string ReadFileIntoString(const char* filename) {
char buffer[kBufSize];
string s;
FILE* fp;
if ((errno = SafeFOpen(&fp, filename, "r") != 0)) PFATAL(filename);
if ((errno = SafeFOpen(&fp, filename, "r")) != 0) PFATAL(filename);
size_t n;
while ( (n=fread(buffer, 1, kBufSize, fp)) > 0 ) {
if (ferror(fp)) PFATAL(filename);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment