make various dprintf macros safer for general usage

Signed-off-by: Thilo Graf <dbt@novatux.de>


Origin commit data
------------------
Branch: ni/coolstream
Commit: 9c2d9c8a25
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2016-01-04 (Mon, 04 Jan 2016)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2016-01-04 21:07:02 +01:00
committed by vanhofen
parent 1a7da7b852
commit fd094d3359
2 changed files with 10 additions and 2 deletions

View File

@@ -28,7 +28,11 @@
extern int timerd_debug;
#define dprintf(fmt, args...) {if(timerd_debug) printf( "[timerd] " fmt, ## args);}
#define dprintf(fmt, args...) \
do { \
if(timerd_debug) \
printf( "[timerd] " fmt, ## args); \
} while(0)
#define dperror(str) {perror("[timerd] " str);}