mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 18:01:06 +02:00
make various dprintf macros safer for general usage
Signed-off-by: Thilo Graf <dbt@novatux.de>
Origin commit data
------------------
Commit: 9c2d9c8a25
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2016-01-04 (Mon, 04 Jan 2016)
This commit is contained in:
committed by
vanhofen
parent
18ecc961ff
commit
ff1e81197a
@@ -39,7 +39,11 @@ enum
|
||||
|
||||
void setDebugLevel( int level );
|
||||
|
||||
#define dprintf(debuglevel, fmt, args...) {if(debug>=debuglevel) printf( "[neutrino] " fmt, ## args);}
|
||||
#define dprintf(debuglevel, fmt, args...) \
|
||||
do { \
|
||||
if (debug >= debuglevel) \
|
||||
printf( "[neutrino] " fmt, ## args); \
|
||||
} while(0)
|
||||
#define dperror(str) {perror("[neutrino] " str);}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user