From ddec0a101bfb97caa23ca731b8041547717a5eb3 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 2 Feb 2002 13:44:24 +0100 Subject: Changed the [dei]syslog macros to use var args; fixed error handling in establishing an SVDRP connection --- tools.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools.h') diff --git a/tools.h b/tools.h index f9390185..4a1132ef 100644 --- a/tools.h +++ b/tools.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.h 1.39 2002/01/26 15:38:10 kls Exp $ + * $Id: tools.h 1.40 2002/02/02 13:16:47 kls Exp $ */ #ifndef __TOOLS_H @@ -20,9 +20,9 @@ extern int SysLogLevel; -#define esyslog if (SysLogLevel > 0) syslog -#define isyslog if (SysLogLevel > 1) syslog -#define dsyslog if (SysLogLevel > 2) syslog +#define esyslog(a...) void( (SysLogLevel > 0) ? syslog(a) : void() ) +#define isyslog(a...) void( (SysLogLevel > 1) ? syslog(a) : void() ) +#define dsyslog(a...) void( (SysLogLevel > 2) ? syslog(a) : void() ) #define LOG_ERROR esyslog(LOG_ERR, "ERROR (%s,%d): %m", __FILE__, __LINE__) #define LOG_ERROR_STR(s) esyslog(LOG_ERR, "ERROR: %s: %m", s) -- cgit v1.2.3