format string cast ptrdiff on 32bit arch (#747262)
Cast ptrdiff (diff between two pointers) to long to fix printfs. This fixes FTBFS on 32bit architectures. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
committed by
Ronnie Sahlberg
parent
717b95cb8a
commit
d7ab603ba0
@@ -134,7 +134,7 @@ iscsi_process_text_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
|
|||||||
if (end == NULL) {
|
if (end == NULL) {
|
||||||
iscsi_set_error(iscsi, "NUL not found after offset %ld "
|
iscsi_set_error(iscsi, "NUL not found after offset %ld "
|
||||||
"when parsing discovery data",
|
"when parsing discovery data",
|
||||||
ptr - in->data);
|
(long)(ptr - in->data));
|
||||||
pdu->callback(iscsi, SCSI_STATUS_ERROR, NULL,
|
pdu->callback(iscsi, SCSI_STATUS_ERROR, NULL,
|
||||||
pdu->private_data);
|
pdu->private_data);
|
||||||
iscsi_free_discovery_addresses(iscsi, targets);
|
iscsi_free_discovery_addresses(iscsi, targets);
|
||||||
|
|||||||
@@ -996,7 +996,7 @@ iscsi_process_login_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
|
|||||||
if (end == NULL) {
|
if (end == NULL) {
|
||||||
iscsi_set_error(iscsi, "NUL not found after offset %ld "
|
iscsi_set_error(iscsi, "NUL not found after offset %ld "
|
||||||
"when parsing login data",
|
"when parsing login data",
|
||||||
(unsigned char *)ptr - in->data);
|
(long)((unsigned char *)ptr - in->data));
|
||||||
pdu->callback(iscsi, SCSI_STATUS_ERROR, NULL,
|
pdu->callback(iscsi, SCSI_STATUS_ERROR, NULL,
|
||||||
pdu->private_data);
|
pdu->private_data);
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user