From 132061b4d3888fb5be2b93d19d934155ed138fbe Mon Sep 17 00:00:00 2001 From: leitner Date: Thu, 26 Aug 2004 16:08:37 +0000 Subject: [PATCH] add { } while (0) trick to errmsg macros --- Makefile | 4 ++-- errmsg.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index bf0c806..927816f 100644 --- a/Makefile +++ b/Makefile @@ -663,8 +663,8 @@ uninstall: rm -f $(patsubst %.3,$(MAN3DIR)/%.3,$(notdir $(wildcard */*.3))) rm -f $(LIBDIR)/libowfat.a -VERSION=libowfat-0.20 -CURNAME=libowfat-0.17 +VERSION=libowfat-0.21 +CURNAME=libowfat-0.20 tar: clean rename rm -f dep libdep diff --git a/errmsg.h b/errmsg.h index 3a56fee..804148e 100644 --- a/errmsg.h +++ b/errmsg.h @@ -23,7 +23,7 @@ void errmsg_warnsys(const char* message, ...); #define carp(...) errmsg_warn(__VA_ARGS__,0) #define carpsys(...) errmsg_warnsys(__VA_ARGS__,0) -#define die(n,...) { errmsg_warn(__VA_ARGS__,0); exit(n); } -#define diesys(n,...) { errmsg_warnsys(__VA_ARGS__,0); exit(n); } +#define die(n,...) do { errmsg_warn(__VA_ARGS__,0); exit(n); } while (0) +#define diesys(n,...) do { errmsg_warnsys(__VA_ARGS__,0); exit(n); } while (0) #endif