aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Toshiyuki Sasaki <ansasaki@redhat.com>2019-06-14 11:41:06 +0200
committerAndreas Schneider <asn@cryptomilk.org>2019-06-14 15:22:45 +0200
commit0280ff12a533bebee0bb94398d68445637eaef6a (patch)
treee278c4f4554fea7c9f0dfeaee8f8594b56d776e4
parentb775e316fa9c07c37bf0b7b5c7f959c9aa770f23 (diff)
downloadlibssh-0280ff12a533bebee0bb94398d68445637eaef6a.tar.gz
libssh-0280ff12a533bebee0bb94398d68445637eaef6a.tar.xz
libssh-0280ff12a533bebee0bb94398d68445637eaef6a.zip
sftp: Do not mix integer types
Don't use long unsigned int as equivalent as uint32_t. Use macros to correctly print the values independently of the architecture. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/sftp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sftp.c b/src/sftp.c
index d2231039..f88ae633 100644
--- a/src/sftp.c
+++ b/src/sftp.c
@@ -1345,7 +1345,7 @@ static sftp_attributes sftp_parse_attr_3(sftp_session sftp, ssh_buffer buf,
goto error;
}
SSH_LOG(SSH_LOG_PROTOCOL,
- "Flags: %.8lx\n", (long unsigned int) attr->flags);
+ "Flags: %.8"PRIx32"\n", (uint32_t) attr->flags);
if (attr->flags & SSH_FILEXFER_ATTR_SIZE) {
rc = ssh_buffer_unpack(buf, "q", &attr->size);
@@ -1353,8 +1353,8 @@ static sftp_attributes sftp_parse_attr_3(sftp_session sftp, ssh_buffer buf,
goto error;
}
SSH_LOG(SSH_LOG_PROTOCOL,
- "Size: %llu\n",
- (long long unsigned int) attr->size);
+ "Size: %"PRIu64"\n",
+ (uint64_t) attr->size);
}
if (attr->flags & SSH_FILEXFER_ATTR_UIDGID) {