aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schink <sane-dev@marcschink.de>2017-01-15 18:59:14 +0100
committerMarc Schink <sane-dev@marcschink.de>2017-01-15 18:59:14 +0100
commite038c320f07013b18b0c421bcccba8835136f1ac (patch)
tree306c05ce58bd0473c71e0e98ecaac13162c8773b
parent885ee1537520fbc1eefe3cc29f156a97cb577e4c (diff)
xerox_mfp: Fix various format specifiers
-rw-r--r--backend/xerox_mfp.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/backend/xerox_mfp.c b/backend/xerox_mfp.c
index 47d925e..945c385 100644
--- a/backend/xerox_mfp.c
+++ b/backend/xerox_mfp.c
@@ -231,7 +231,7 @@ static void dbg_dump(struct device *dev)
for (i = 0; i < dlen; i++, dptr += 3)
sprintf(dptr, " %02x", dev->res[i]);
- DBG(5, "[%lu]%s%s\n", (u_long)dev->reslen, dbuf,
+ DBG(5, "[%zu]%s%s\n", dev->reslen, dbuf,
(dlen < (int)dev->reslen)? "..." : "");
}
@@ -258,8 +258,8 @@ static int dev_command(struct device *dev, SANE_Byte *cmd, size_t reqlen)
}
dev->state = 0;
- DBG(4, ":: dev_command(%s[%#x], %lu)\n", str_cmd(cmd[2]), cmd[2],
- (u_long)reqlen);
+ DBG(4, ":: dev_command(%s[%#x], %zu)\n", str_cmd(cmd[2]), cmd[2],
+ reqlen);
status = dev->io->dev_request(dev, cmd, sendlen, res, &dev->reslen);
if (status != SANE_STATUS_GOOD) {
DBG(1, "%s: dev_request: %s\n", __func__, sane_strstatus(status));
@@ -274,8 +274,8 @@ static int dev_command(struct device *dev, SANE_Byte *cmd, size_t reqlen)
/* normal command reply, some sanity checking */
if (dev->reslen < reqlen) {
- DBG(1, "%s: illegal response len %lu, need %lu\n",
- __func__, (u_long)dev->reslen, (u_long)reqlen);
+ DBG(1, "%s: illegal response len %zu, need %zu\n",
+ __func__, dev->reslen, reqlen);
dev->state = SANE_STATUS_IO_ERROR;
return 0;
} else {
@@ -291,14 +291,14 @@ static int dev_command(struct device *dev, SANE_Byte *cmd, size_t reqlen)
}
pktlen = dev->res[2] + 3;
if (dev->reslen != pktlen) {
- DBG(2, "%s: illegal response len %lu, should be %lu\n",
- __func__, (u_long)pktlen, (u_long)dev->reslen);
+ DBG(2, "%s: illegal response len %zu, should be %zu\n",
+ __func__, pktlen, dev->reslen);
dev->state = SANE_STATUS_IO_ERROR;
return 0;
}
if (dev->reslen > reqlen)
- DBG(2, "%s: too big packet len %lu, need %lu\n",
- __func__, (u_long)dev->reslen, (u_long)reqlen);
+ DBG(2, "%s: too big packet len %zu, need %zu\n",
+ __func__, dev->reslen, reqlen);
}
dev->state = 0;
@@ -1348,8 +1348,8 @@ sane_read(SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *lenp)
while (datalen && dev->blocklen) {
SANE_Byte *rbuf = dev->data + DATATAIL(dev);
- DBG(9, "<> request len: %lu, [%d, %d; %d]\n",
- (u_long)datalen, dev->dataoff, DATATAIL(dev), dev->datalen);
+ DBG(9, "<> request len: %zu, [%d, %d; %d]\n",
+ datalen, dev->dataoff, DATATAIL(dev), dev->datalen);
if ((status = dev->io->dev_request(dev, NULL, 0, rbuf, &datalen)) !=
SANE_STATUS_GOOD)
@@ -1358,8 +1358,8 @@ sane_read(SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *lenp)
dev->datalen += datalen;
dev->blocklen -= datalen;
- DBG(9, "<> got %lu, [%d, %d; %d]\n",
- (u_long)datalen, dev->dataoff, DATATAIL(dev), dev->datalen);
+ DBG(9, "<> got %zu, [%d, %d; %d]\n",
+ datalen, dev->dataoff, DATATAIL(dev), dev->datalen);
if (dev->blocklen < 0)
return ret_cancel(dev, SANE_STATUS_IO_ERROR);