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:
Michael Tokarev
2014-05-07 16:10:40 +04:00
committed by Ronnie Sahlberg
parent 717b95cb8a
commit d7ab603ba0
2 changed files with 2 additions and 2 deletions

View File

@@ -134,7 +134,7 @@ iscsi_process_text_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
if (end == NULL) {
iscsi_set_error(iscsi, "NUL not found after offset %ld "
"when parsing discovery data",
ptr - in->data);
(long)(ptr - in->data));
pdu->callback(iscsi, SCSI_STATUS_ERROR, NULL,
pdu->private_data);
iscsi_free_discovery_addresses(iscsi, targets);

View File

@@ -996,7 +996,7 @@ iscsi_process_login_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
if (end == NULL) {
iscsi_set_error(iscsi, "NUL not found after offset %ld "
"when parsing login data",
(unsigned char *)ptr - in->data);
(long)((unsigned char *)ptr - in->data));
pdu->callback(iscsi, SCSI_STATUS_ERROR, NULL,
pdu->private_data);
return -1;