diff options
Diffstat (limited to 'block/curl.c')
-rw-r--r-- | block/curl.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/block/curl.c b/block/curl.c index 426fb4d67..5a8f8b623 100644 --- a/block/curl.c +++ b/block/curl.c @@ -36,16 +36,10 @@ // #define DEBUG_VERBOSE #ifdef DEBUG_CURL -#define DEBUG_CURL_PRINT 1 +#define DPRINTF(fmt, ...) do { printf(fmt, ## __VA_ARGS__); } while (0) #else -#define DEBUG_CURL_PRINT 0 +#define DPRINTF(fmt, ...) do { } while (0) #endif -#define DPRINTF(fmt, ...) \ - do { \ - if (DEBUG_CURL_PRINT) { \ - fprintf(stderr, fmt, ## __VA_ARGS__); \ - } \ - } while (0) #if LIBCURL_VERSION_NUM >= 0x071000 /* The multi interface timer callback was introduced in 7.16.0 */ @@ -169,7 +163,7 @@ static int curl_sock_cb(CURL *curl, curl_socket_t fd, int action, state->sock_fd = fd; s = state->s; - DPRINTF("CURL (AIO): Sock action %d on fd %d\n", action, (int)fd); + DPRINTF("CURL (AIO): Sock action %d on fd %d\n", action, fd); switch (action) { case CURL_POLL_IN: aio_set_fd_handler(s->aio_context, fd, false, |