From: Guus Sliepen Date: Sun, 15 Nov 2015 19:35:30 +0000 (+0100) Subject: Only log debug messages in test program when UTCP_DEBUG is defined. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=5bad36c4252858693b5cfe59a94540ccd2b0be42;p=utcp Only log debug messages in test program when UTCP_DEBUG is defined. --- 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) {