Skip to content

Instantly share code, notes, and snippets.

@bdrewery
Created October 17, 2021 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdrewery/05b3377d07cf4be3c79588131a96e5f7 to your computer and use it in GitHub Desktop.
Save bdrewery/05b3377d07cf4be3c79588131a96e5f7 to your computer and use it in GitHub Desktop.
diff --git src/poudriere-sh/helpers.h src/poudriere-sh/helpers.h
index 9a9f151a9..930c0de89 100644
--- src/poudriere-sh/helpers.h
+++ src/poudriere-sh/helpers.h
@@ -107,7 +107,10 @@ void verrorwithstatus(int, const char *, va_list) __printf0like(2, 0) __dead2;
#define exit_(...) exit_X(__VA_ARGS__, _1, _0)(__VA_ARGS__)
#define exit_X(_0, _1, X, ...) exit ## X
#define exit_0(_) return (0)
-#define exit_1(_, status) verrorwithstatus(status, NULL, NULL)
+#define exit_1(_, status) do { \
+ va_list va_empty; \
+ verrorwithstatus(status, NULL, va_empty); \
+} while (0)
/* Getopt compat */
#include "options.h"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment