Krolyxon
Commit d08408e

Branches

Refs →

nsxivd08408e

Make use of EXIT_* macros (2)

Author
Bert Münnich
Date
2011-09-26 21:28 +0200
Parent
9e52ae7
Commit
d08408e94250425e677e1ab33d917e05e229faa2

+4 −4

2 files changed

  1. M Makefile +1 −1
  2. M main.c +3 −3
M Makefile View
@@ -1,4 +1,4 @@
1−VERSION = git-20110923
1+VERSION = git-20110926
22
33 CC = gcc
44 CFLAGS = -Wall -pedantic -O2
M main.c View
@@ -109,15 +109,15 @@ void check_add_file(char *filename) {
109109 fileidx++;
110110 }
111111
112−void remove_file(int n, bool silent) {
112+void remove_file(int n, bool manual) {
113113 if (n < 0 || n >= filecnt)
114114 return;
115115
116116 if (filecnt == 1) {
117− if (!silent)
117+ if (!manual)
118118 fprintf(stderr, "sxiv: no more files to display, aborting\n");
119119 cleanup();
120− exit(!silent);
120+ exit(manual ? EXIT_SUCCESS : EXIT_FAILURE);
121121 }
122122
123123 if (files[n].path != files[n].name)