summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-04-15 19:02:21 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-04-15 19:03:02 +0200
commitb1d58c5454fc8d75be5f5b4fdcca582d089c0827 (patch)
tree751ea13f896372967d5a797e8135748a1582b52b
parentced66eb11f48107a3354a39345c73422a4b33582 (diff)
downloadlibssh-b1d58c5454fc8d75be5f5b4fdcca582d089c0827.tar.gz
libssh-b1d58c5454fc8d75be5f5b4fdcca582d089c0827.tar.xz
libssh-b1d58c5454fc8d75be5f5b4fdcca582d089c0827.zip
Fix assertion with Visual Studio because of %zu.
(cherry picked from commit ef658b4bef82670b6064078df355d6b6cf5ac999)
-rw-r--r--src/channels.c4
-rw-r--r--src/channels1.c2
-rw-r--r--src/kex.c2
-rw-r--r--src/sftp.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/channels.c b/src/channels.c
index b136332f..cd11ca77 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -474,7 +474,7 @@ SSH_PACKET_CALLBACK(channel_rcv_data){
len = ssh_string_len(str);
ssh_log(session, SSH_LOG_PROTOCOL,
- "Channel receiving %zu bytes data in %d (local win=%d remote win=%d)",
+ "Channel receiving %" PRIdS " bytes data in %d (local win=%d remote win=%d)",
len,
is_stderr,
channel->local_window,
@@ -483,7 +483,7 @@ SSH_PACKET_CALLBACK(channel_rcv_data){
/* What shall we do in this case? Let's accept it anyway */
if (len > channel->local_window) {
ssh_log(session, SSH_LOG_RARE,
- "Data packet too big for our window(%zu vs %d)",
+ "Data packet too big for our window(%" PRIdS " vs %d)",
len,
channel->local_window);
}
diff --git a/src/channels1.c b/src/channels1.c
index d18aa96c..e607b132 100644
--- a/src/channels1.c
+++ b/src/channels1.c
@@ -232,7 +232,7 @@ SSH_PACKET_CALLBACK(ssh_packet_data1){
}
ssh_log(session, SSH_LOG_PROTOCOL,
- "Adding %zu bytes data in %d",
+ "Adding %" PRIdS " bytes data in %d",
ssh_string_len(str), is_stderr);
if (channel_default_bufferize(channel, ssh_string_data(str), ssh_string_len(str),
diff --git a/src/kex.c b/src/kex.c
index c4723a2b..2c7276b2 100644
--- a/src/kex.c
+++ b/src/kex.c
@@ -761,7 +761,7 @@ SSH_PACKET_CALLBACK(ssh_packet_publickey1){
}
bits = ssh_string_len(enc_session) * 8 - 7;
- ssh_log(session, SSH_LOG_PROTOCOL, "%d bits, %zu bytes encrypted session",
+ ssh_log(session, SSH_LOG_PROTOCOL, "%d bits, %" PRIdS " bytes encrypted session",
bits, ssh_string_len(enc_session));
bits = htons(bits);
/* the encrypted mpint */
diff --git a/src/sftp.c b/src/sftp.c
index 58859b7f..7cf0042c 100644
--- a/src/sftp.c
+++ b/src/sftp.c
@@ -1817,7 +1817,7 @@ ssize_t sftp_read(sftp_file handle, void *buf, size_t count) {
if (ssh_string_len(datastring) > count) {
ssh_set_error(sftp->session, SSH_FATAL,
"Received a too big DATA packet from sftp server: "
- "%zu and asked for %zu",
+ "%" PRIdS " and asked for %" PRIdS,
ssh_string_len(datastring), count);
ssh_string_free(datastring);
return -1;
@@ -1938,7 +1938,7 @@ int sftp_async_read(sftp_file file, void *data, uint32_t size, uint32_t id){
if (ssh_string_len(datastring) > size) {
ssh_set_error(sftp->session, SSH_FATAL,
"Received a too big DATA packet from sftp server: "
- "%zu and asked for %u",
+ "%" PRIdS " and asked for %u",
ssh_string_len(datastring), size);
ssh_string_free(datastring);
sftp_leave_function();