mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-27 08:10:07 +08:00
rdoff: check return value of freopen
fixes pvs-studio error 'V530 The return value of function 'freopen' is required to be utilized.' Signed-off-by: Martin Lindhe <martin-commit@ubique.se> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
8cc93f5232
commit
a6ccf005a5
@ -351,7 +351,11 @@ int main(int argc, char **argv)
|
||||
fseek(fp, 0, SEEK_SET);
|
||||
copybytes(fp, fptmp, l);
|
||||
rewind(fptmp);
|
||||
freopen(argv[2], "wb", fp);
|
||||
if (freopen(argv[2], "wb", fp) == NULL) {
|
||||
fprintf(stderr, "rdflib: could not reopen '%s'\n", argv[2]);
|
||||
perror("rdflib");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
while (!feof(fptmp)) {
|
||||
/* read name */
|
||||
|
Loading…
Reference in New Issue
Block a user