Skip to content

Commit

Permalink
ztx correct applog typing
Browse files Browse the repository at this point in the history
  • Loading branch information
kanoi committed May 2, 2013
1 parent 54d5d26 commit d3955b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions driver-ztex.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,13 @@ static int64_t ztex_scanhash(struct thr_info *thr, struct work *work,
if (nonce > noncecnt)
noncecnt = nonce;
if (((0xffffffff - nonce) < (nonce - lastnonce[i])) || nonce < lastnonce[i]) {
applog(LOG_DEBUG, "%s: overflow nonce=%0.8x lastnonce=%0.8x", ztex->repr, nonce, lastnonce[i]);
applog(LOG_DEBUG, "%s: overflow nonce=%08x lastnonce=%08x", ztex->repr, nonce, lastnonce[i]);
overflow = true;
} else
lastnonce[i] = nonce;

if (ztex_checkNonce(work, nonce) != (hdata->hash7 + 0x5be0cd19)) {
applog(LOG_DEBUG, "%s: checkNonce failed for %0.8X", ztex->repr, nonce);
applog(LOG_DEBUG, "%s: checkNonce failed for %08X", ztex->repr, nonce);

// do not count errors in the first 500ms after sendHashData (2x250 wait time)
if (count > 2) {
Expand Down Expand Up @@ -320,7 +320,7 @@ static int64_t ztex_scanhash(struct thr_info *thr, struct work *work,

work->blk.nonce = 0xffffffff;
submit_nonce(thr, work, nonce);
applog(LOG_DEBUG, "%s: submitted %0.8x", ztex->repr, nonce);
applog(LOG_DEBUG, "%s: submitted %08x", ztex->repr, nonce);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions libztex.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static enum check_result libztex_checkDevice(struct libusb_device *dev)
}

if (desc.idVendor != LIBZTEX_IDVENDOR || desc.idProduct != LIBZTEX_IDPRODUCT) {
applog(LOG_DEBUG, "Not a ZTEX device %0.4x:%0.4x", desc.idVendor, desc.idProduct);
applog(LOG_DEBUG, "Not a ZTEX device %04x:%04x", desc.idVendor, desc.idProduct);
return CHECK_IS_NOT_ZTEX;
}

Expand Down Expand Up @@ -238,7 +238,7 @@ static enum check_result libztex_checkDevice(struct libusb_device *dev)
fp = NULL;

if (got_bytes < length) {
applog(LOG_ERR, "%s: Incomplete firmware read: %d/%d", __func__, got_bytes, length);
applog(LOG_ERR, "%s: Incomplete firmware read: %zu/%zu", __func__, got_bytes, length);
goto done;
}

Expand Down Expand Up @@ -735,7 +735,7 @@ int libztex_scanDevices(struct libztex_dev_list*** devs_p)
do {
cnt = libusb_get_device_list(NULL, &list);
if (unlikely(cnt < 0)) {
applog(LOG_ERR, "Ztex scan devices: Failed to list usb devices with err %d", cnt);
applog(LOG_ERR, "Ztex scan devices: Failed to list usb devices with err %zd", cnt);
goto done;
}

Expand Down

0 comments on commit d3955b8

Please sign in to comment.