From 5bad36c4252858693b5cfe59a94540ccd2b0be42 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 15 Nov 2015 20:35:30 +0100 Subject: [PATCH] Only log debug messages in test program when UTCP_DEBUG is defined. --- test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test.c b/test.c index a078e1f..81244f9 100644 --- a/test.c +++ b/test.c @@ -35,6 +35,7 @@ char *reorder_data; size_t reorder_len; int reorder_countdown; +#if UTCP_DEBUG void debug(const char *format, ...) { struct timeval now; gettimeofday(&now, NULL); @@ -44,6 +45,9 @@ void debug(const char *format, ...) { vfprintf(stderr, format, ap); va_end(ap); } +#else +#define debug(...) +#endif ssize_t do_recv(struct utcp_connection *c, const void *data, size_t len) { if(!data || !len) { -- 2.39.5