summaryrefslogtreecommitdiff
path: root/tools.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-02-02 13:44:24 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-02-02 13:44:24 +0100
commitddec0a101bfb97caa23ca731b8041547717a5eb3 (patch)
tree10ae250d9740fae442ca54466ca69e175f223ee9 /tools.h
parent2a31a4eca81b75bfab9a9fbbe2aa8f9eeec38f9f (diff)
downloadvdr-ddec0a101bfb97caa23ca731b8041547717a5eb3.tar.gz
vdr-ddec0a101bfb97caa23ca731b8041547717a5eb3.tar.bz2
Changed the [dei]syslog macros to use var args; fixed error handling in establishing an SVDRP connection
Diffstat (limited to 'tools.h')
-rw-r--r--tools.h8
1 files changed, 4 insertions, 4 deletions
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)