aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/grab.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/grab.c b/src/grab.c
index 97c77ef..68968f3 100644
--- a/src/grab.c
+++ b/src/grab.c
@@ -34,12 +34,17 @@
#define lengthof(a) (sizeof(a) / sizeof(*(a)))
-#define die(...) err(EXIT_FAILURE, __VA_ARGS__)
-#define diex(...) errx(EXIT_FAILURE, __VA_ARGS__)
+#define die(...) err(3, __VA_ARGS__)
+#define diex(...) errx(3, __VA_ARGS__)
#define warn(...) \
do { \
warn(__VA_ARGS__); \
- rv = EXIT_FAILURE; \
+ rv = 3; \
+ } while (0)
+#define warnx(...) \
+ do { \
+ warnx(__VA_ARGS__); \
+ rv = 3; \
} while (0)
#define streq(a, b) (!strcmp(a, b))
@@ -636,7 +641,6 @@ putm(struct sv sv, struct matches *ms, const char *filename)
break;
default:
warnx("invalid color value -- '%s'", val);
- rv = EXIT_FAILURE;
}
}
}