photomosaics

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 45a1499e177cbc9e1203f87ad76690934ef0dc1e
parent 42fe526326200429d03196374f52e8d96fedf3dc
Author: Wilson Gheen <wilson@wilsonrgheen.com>
Date:   Sun, 15 Jan 2023 10:31:28 -0600

Make `DIE` safe to use outside `main` just in case

Diffstat:
Mphotomosaics.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/photomosaics.c b/photomosaics.c @@ -13,7 +13,7 @@ #include <unistd.h> #include <MagickCore/MagickCore.h> -#define DIE(rc, fmt, ...) { fprintf(stderr, "FATAL: "fmt"\n", __VA_ARGS__); return rc; } +#define DIE(rc, fmt, ...) { fprintf(stderr, "FATAL: "fmt"\n", __VA_ARGS__); exit(rc); } #define WARN(fmt, ...) { fprintf(stderr, "WARN: " fmt"\n", __VA_ARGS__); } #define assert_error(expression, s) if(!expression) { perror(s); abort(); }