Fix files and fairland to report ef_open() failure just once
ef_open() already reports failure since commit 7eb2fe57
, v4.2.20.
Drop the second report from its callers.
This commit is contained in:
parent
f006e373f9
commit
73129c15cc
2 changed files with 2 additions and 6 deletions
|
@ -260,10 +260,8 @@ main(int argc, char *argv[])
|
||||||
fprintf(stderr, "Can't chdir to %s (%s)\n", gamedir, strerror(errno));
|
fprintf(stderr, "Can't chdir to %s (%s)\n", gamedir, strerror(errno));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
if (!ef_open(EF_SECTOR, EFF_MEM | EFF_NOTIME)) {
|
if (!ef_open(EF_SECTOR, EFF_MEM | EFF_NOTIME))
|
||||||
perror("ef_open");
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
|
||||||
write_sects();
|
write_sects();
|
||||||
qprint("writing to sectors file...\n");
|
qprint("writing to sectors file...\n");
|
||||||
if (!ef_close(EF_SECTOR))
|
if (!ef_close(EF_SECTOR))
|
||||||
|
|
|
@ -130,10 +130,8 @@ main(int argc, char *argv[])
|
||||||
for (i = 0; i < EF_MAX; i++) {
|
for (i = 0; i < EF_MAX; i++) {
|
||||||
if (!EF_IS_GAME_STATE(i))
|
if (!EF_IS_GAME_STATE(i))
|
||||||
continue;
|
continue;
|
||||||
if (!ef_open(i, EFF_CREATE | EFF_NOTIME)) {
|
if (!ef_open(i, EFF_CREATE | EFF_NOTIME))
|
||||||
perror("ef_open");
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ef_read(EF_NATION, 0, &nat);
|
ef_read(EF_NATION, 0, &nat);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue