From: Simon Wilkinson Date: Thu, 18 Dec 2008 14:05:21 +0000 (+0000) Subject: DEVEL15-tweak-vicelog-macros-20081218 X-Git-Tag: openafs-devel-1_5_56~27 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=7240f570589c28ba3bec7a9dd04f4bcb8617e6fa;p=packages%2Fo%2Fopenafs.git DEVEL15-tweak-vicelog-macros-20081218 LICENSE IPL10 deal with macro semicolon confusion for vicelog (cherry picked from commit 12297b95885d030e5cae6bec2543bdeb3e65b5ee) --- diff --git a/src/util/afsutil.h b/src/util/afsutil.h index dceb2e36b..50c1802f3 100644 --- a/src/util/afsutil.h +++ b/src/util/afsutil.h @@ -43,8 +43,8 @@ extern void vFSLog(const char *format, va_list args); extern void SetLogThreadNumProgram(int (*func) (void) ); /*@printflike@*/ extern void FSLog(const char *format, ...); -#define ViceLog(level, str) if ((level) <= LogLevel) (FSLog str) -#define vViceLog(level, str) if ((level) <= LogLevel) (vFSLog str) +#define ViceLog(level, str) do { if ((level) <= LogLevel) (FSLog str) } while (0) +#define vViceLog(level, str) do { if ((level) <= LogLevel) (vFSLog str) } while (0) extern int OpenLog(const char *filename); extern int ReOpenLog(const char *fileName);