Merge pull request #799 from ennorehling/develop

fix multiple coverity defects in parsers.
This commit is contained in:
Enno Rehling 2018-09-04 15:21:47 +02:00 committed by GitHub
commit 6fee918536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 238 additions and 213 deletions

File diff suppressed because it is too large Load Diff

View File

@ -66,6 +66,7 @@ int pofile_read(const char *filename, int (*callback)(const char *msgid, const c
if (!F) {
log_error("could not open %s", filename);
return -1;
}
msgctxt[0] = 0;
@ -106,10 +107,10 @@ int pofile_read(const char *filename, int (*callback)(const char *msgid, const c
line = read_line(F);
}
}
if (ferror(F)) {
log_error("read error in %s:%d.", filename, po_lineno);
return -1;
}
err = ferror(F);
fclose(F);
if (err) {
log_error("read error %d in %s:%d.", err, filename, po_lineno);
}
return err;
}