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) { ...@@ -997,7 +997,7 @@ static string ReadFileIntoString(const char* filename) {
char buffer[kBufSize]; char buffer[kBufSize];
string s; string s;
FILE* fp; FILE* fp;
if ((errno = SafeFOpen(&fp, filename, "r") != 0)) PFATAL(filename); if ((errno = SafeFOpen(&fp, filename, "r")) != 0) PFATAL(filename);
size_t n; size_t n;
while ( (n=fread(buffer, 1, kBufSize, fp)) > 0 ) { while ( (n=fread(buffer, 1, kBufSize, fp)) > 0 ) {
if (ferror(fp)) PFATAL(filename); 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