From 20c6108edbd40e08b841683d56dbad049ed11d88 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 11 Aug 2013 01:26:47 +0200 Subject: [PATCH] Use %zu to print size_t and ssize_t. --- src/connection.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/connection.c b/src/connection.c index 54752ac..07885df 100644 --- a/src/connection.c +++ b/src/connection.c @@ -696,8 +696,8 @@ static int read_from_write_to(int from, int to) { return -1; } if (size_read != size_written) { - LOG(ERROR, "read_from_write_to(): only written %ld of %ld bytes!", - (long int)size_written, (long int)size_read); + LOG(ERROR, "read_from_write_to(): only written %zu of %zu bytes!", + size_written, size_read); return -1; } @@ -724,8 +724,8 @@ static void transfer_data_tls(int client, int server, if (gnutls_record_get_max_size(server_session) < buffer_size) { buffer_size = gnutls_record_get_max_size(server_session); } - LOG(DEBUG2, "transfer_data_tls(): suggested buffer size: %ld", - (long int)buffer_size); + LOG(DEBUG2, "transfer_data_tls(): suggested buffer size: %zu", + buffer_size); for (;;) { int result = poll(fds, 2 /* fd count */, -1 /* no timeout */); @@ -771,8 +771,8 @@ static int read_from_write_to_tls(gnutls_session_t from, char buffer[16384]; /* GnuTLS default maximum */ if (buffer_size > sizeof(buffer)) { - LOG(WARNING, "read_from_write_to_tls(): reduced buffer size to %ld", - (long int)(sizeof(buffer))); + LOG(WARNING, "read_from_write_to_tls(): reduced buffer size to %zu", + sizeof(buffer)); buffer_size = sizeof(buffer); } @@ -793,8 +793,8 @@ static int read_from_write_to_tls(gnutls_session_t from, return -1; } if (size_read != size_written) { - LOG(ERROR, "read_from_write_to_tls(): only written %ld of %ld bytes!", - (long int)size_written, (long int)size_read); + LOG(ERROR, "read_from_write_to_tls(): only written %zu of %zu bytes!", + size_written, size_read); return -1; } -- 2.45.2