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;
}
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 */);
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);
}
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;
}