Make use of EXIT_* macros (2)

This commit is contained in:
Bert Münnich
2011-09-26 21:28:27 +02:00
parent 9e52ae768e
commit d08408e942
2 changed files with 4 additions and 4 deletions

6
main.c
View File

@ -109,15 +109,15 @@ void check_add_file(char *filename) {
fileidx++;
}
void remove_file(int n, bool silent) {
void remove_file(int n, bool manual) {
if (n < 0 || n >= filecnt)
return;
if (filecnt == 1) {
if (!silent)
if (!manual)
fprintf(stderr, "sxiv: no more files to display, aborting\n");
cleanup();
exit(!silent);
exit(manual ? EXIT_SUCCESS : EXIT_FAILURE);
}
if (files[n].path != files[n].name)