mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03:00
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>
This commit is contained in:
committed by
Andreas Schneider
parent
b775e316fa
commit
0280ff12a5
@@ -1345,7 +1345,7 @@ static sftp_attributes sftp_parse_attr_3(sftp_session sftp, ssh_buffer buf,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
SSH_LOG(SSH_LOG_PROTOCOL,
|
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) {
|
if (attr->flags & SSH_FILEXFER_ATTR_SIZE) {
|
||||||
rc = ssh_buffer_unpack(buf, "q", &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;
|
goto error;
|
||||||
}
|
}
|
||||||
SSH_LOG(SSH_LOG_PROTOCOL,
|
SSH_LOG(SSH_LOG_PROTOCOL,
|
||||||
"Size: %llu\n",
|
"Size: %"PRIu64"\n",
|
||||||
(long long unsigned int) attr->size);
|
(uint64_t) attr->size);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attr->flags & SSH_FILEXFER_ATTR_UIDGID) {
|
if (attr->flags & SSH_FILEXFER_ATTR_UIDGID) {
|
||||||
|
|||||||
Reference in New Issue
Block a user