diff options
Diffstat (limited to 'src/apk_defines.h')
-rw-r--r-- | src/apk_defines.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/apk_defines.h b/src/apk_defines.h index c8a3622..d1f26d2 100644 --- a/src/apk_defines.h +++ b/src/apk_defines.h @@ -60,9 +60,9 @@ extern unsigned int apk_flags; #define APK_PREFER_AVAILABLE 0x0040 #define APK_UPDATE_CACHE 0x0080 -#define apk_error(args...) apk_log("ERROR: ", args); -#define apk_warning(args...) if (apk_verbosity > 0) { apk_log("WARNING: ", args); } -#define apk_message(args...) if (apk_verbosity > 0) { apk_log(NULL, args); } +#define apk_error(args...) do { apk_log("ERROR: ", args); } while (0) +#define apk_warning(args...) do { if (apk_verbosity > 0) { apk_log("WARNING: ", args); } } while (0) +#define apk_message(args...) do { if (apk_verbosity > 0) { apk_log(NULL, args); } } while (0) void apk_log(const char *prefix, const char *format, ...); |