aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2021-08-07 15:10:44 +0100
committerTomasz Kramkowski <tk@the-tk.com>2021-08-07 15:17:22 +0100
commit98ef6a8510d555148528e4fffb6cfa587dbd4c46 (patch)
treef79f0f69a4be5b940d5a6b554102d062fa021719 /common.h
parentf382d3caec8c30c3884d5616da04f5a663afa39e (diff)
downloadpack-98ef6a8510d555148528e4fffb6cfa587dbd4c46.tar.gz
pack-98ef6a8510d555148528e4fffb6cfa587dbd4c46.tar.xz
pack-98ef6a8510d555148528e4fffb6cfa587dbd4c46.zip
always va_end even when an error occurs
Diffstat (limited to 'common.h')
-rw-r--r--common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/common.h b/common.h
index f22f588..abef5af 100644
--- a/common.h
+++ b/common.h
@@ -12,6 +12,9 @@
#define BITMASK(n) (UINTMAX_MAX >> (sizeof (uintmax_t) * CHAR_BIT - n))
+#define SET_AND_GOTO(what, to, where) \
+ do { (what) = (to); goto where; } while (0);
+
#ifndef PRIuSIZE
#ifdef _WIN32
#ifdef _WIN64