about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDacav <dacav@fastmail.com>2020-08-29 15:20:07 +0200
committerDacav <dacav@fastmail.com>2020-08-29 15:20:07 +0200
commit32dc8587ab24d5832fb3826a631c8c50524a9a25 (patch)
tree274a9556d1b41b30eda5a54c016b556f36a75af6
parenta24081196ec68979eab49c1e35ce89066eb86d2f (diff)
downloadforg-32dc8587ab24d5832fb3826a631c8c50524a9a25.tar.gz
macros.h
-rw-r--r--forg-import.c3
-rw-r--r--macros.h5
2 files changed, 7 insertions, 1 deletions
diff --git a/forg-import.c b/forg-import.c
index 9f6cdb4..30ee7fc 100644
--- a/forg-import.c
+++ b/forg-import.c
@@ -157,7 +157,8 @@ iter_files(const options_t *opts, void **aux)
         goto done;
       return opts->files[ctx->files_list.next++];
   }
-  err(EX_SOFTWARE, __FILE__ ":%d - buggy", __LINE__);
+
+  bug_abort;
 
 done:
   free(*aux);
diff --git a/macros.h b/macros.h
new file mode 100644
index 0000000..ecf16ce
--- /dev/null
+++ b/macros.h
@@ -0,0 +1,5 @@
+#pragma once
+
+#include <err.h>
+
+#define bug_abort err(EX_SOFTWARE, __FILE__ ":%d - buggy", __LINE__)