]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/commitdiff
Use %zu to print size_t and ssize_t.
authorSimon Ruderich <simon@ruderich.org>
Sat, 10 Aug 2013 23:26:47 +0000 (01:26 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sat, 10 Aug 2013 23:26:47 +0000 (01:26 +0200)
src/connection.c

index 54752aceae38a547dd80f5bcacd7e549ac459c6e..07885dfdeed9337468593376c381c9a57411580f 100644 (file)
@@ -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;
     }