From 0280ff12a533bebee0bb94398d68445637eaef6a Mon Sep 17 00:00:00 2001 From: Anderson Toshiyuki Sasaki Date: Fri, 14 Jun 2019 11:41:06 +0200 Subject: [PATCH] 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 Reviewed-by: Andreas Schneider --- src/sftp.c | 6 +++--- 1 file 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) {