Fix TRACEF macro. Addition to test_logging.c

This commit is contained in:
Nils O. Selåsdal
2013-01-15 19:09:26 +01:00
parent cd61803c9a
commit 6de7a854ec
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -10,9 +10,9 @@
} while (0) } while (0)
#ifdef DEBUG #ifdef DEBUG
#define TRACEF(fmt, args...) #define TRACEF(fmt, ...)\
do { \ do { \
fprintf(stdout, "%s:%d (%s)\t" fmt, __FILE__, __LINE__, __FUNCTION__, ##args);\ fprintf(stdout, "%s:%d (%s)\t" fmt, __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__);\
fflush(stdout);\ fflush(stdout);\
} while(0) } while(0)
#else #else
+1 -1
View File
@@ -52,7 +52,7 @@ START_TEST (test_logfile_location)
uc_log_add_destination(dest); uc_log_add_destination(dest);
UC_LOGF(UC_LL_DEBUG, 0, "Lorum ipson %d\n", 1); UC_LOGF(UC_LL_DEBUG, 0, "Lorum ipson %d\n", 1);
UC_LOGF(UC_LL_DEBUG, 0, "Lorum ipson %d\n", 1); UC_LOGF(UC_LL_DEBUG, 0, "Lorum ipson 2\n");
rc = stat(FILE_NAME, &st); rc = stat(FILE_NAME, &st);
fail_if(rc != 0, "stat failed: %s\n", strerror(errno)); fail_if(rc != 0, "stat failed: %s\n", strerror(errno));