forked from github/server
fix multiple coverity defects in parsers.
This commit is contained in:
parent
af445e5ca1
commit
876113d991
2 changed files with 238 additions and 213 deletions
442
src/exparse.c
442
src/exparse.c
File diff suppressed because it is too large
Load diff
|
@ -66,6 +66,7 @@ int pofile_read(const char *filename, int (*callback)(const char *msgid, const c
|
||||||
|
|
||||||
if (!F) {
|
if (!F) {
|
||||||
log_error("could not open %s", filename);
|
log_error("could not open %s", filename);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
msgctxt[0] = 0;
|
msgctxt[0] = 0;
|
||||||
|
@ -106,10 +107,10 @@ int pofile_read(const char *filename, int (*callback)(const char *msgid, const c
|
||||||
line = read_line(F);
|
line = read_line(F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ferror(F)) {
|
err = ferror(F);
|
||||||
log_error("read error in %s:%d.", filename, po_lineno);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
fclose(F);
|
fclose(F);
|
||||||
|
if (err) {
|
||||||
|
log_error("read error %d in %s:%d.", err, filename, po_lineno);
|
||||||
|
}
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue