mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Fix warning.
This commit is contained in:
parent
0bfe17206a
commit
fe1a3752b7
@ -754,8 +754,8 @@ static bool getinfo(struct cgpu_info *bflsc, int dev)
|
|||||||
char buf[BFLSC_BUFSIZ+1];
|
char buf[BFLSC_BUFSIZ+1];
|
||||||
int err, amount;
|
int err, amount;
|
||||||
char **items, *firstname, **fields, *lf;
|
char **items, *firstname, **fields, *lf;
|
||||||
|
bool res, ok = false;
|
||||||
int i, lines, count;
|
int i, lines, count;
|
||||||
bool res, ok;
|
|
||||||
char *tmp;
|
char *tmp;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -776,7 +776,7 @@ static bool getinfo(struct cgpu_info *bflsc, int dev)
|
|||||||
if (err < 0 || amount != BFLSC_DETAILS_LEN) {
|
if (err < 0 || amount != BFLSC_DETAILS_LEN) {
|
||||||
applog(LOG_ERR, "%s detect (%s) send details request failed (%d:%d)",
|
applog(LOG_ERR, "%s detect (%s) send details request failed (%d:%d)",
|
||||||
bflsc->drv->dname, bflsc->device_path, amount, err);
|
bflsc->drv->dname, bflsc->device_path, amount, err);
|
||||||
return false;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = usb_read_ok_timeout(bflsc, buf, sizeof(buf)-1, &amount,
|
err = usb_read_ok_timeout(bflsc, buf, sizeof(buf)-1, &amount,
|
||||||
@ -789,14 +789,14 @@ static bool getinfo(struct cgpu_info *bflsc, int dev)
|
|||||||
applog(LOG_ERR, "%s detect (%s) get details returned nothing (%d:%d)",
|
applog(LOG_ERR, "%s detect (%s) get details returned nothing (%d:%d)",
|
||||||
bflsc->drv->dname, bflsc->device_path, amount, err);
|
bflsc->drv->dname, bflsc->device_path, amount, err);
|
||||||
}
|
}
|
||||||
return false;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(&sc_dev, 0, sizeof(struct bflsc_dev));
|
memset(&sc_dev, 0, sizeof(struct bflsc_dev));
|
||||||
sc_info->sc_count = 1;
|
sc_info->sc_count = 1;
|
||||||
res = tolines(bflsc, dev, &(buf[0]), &lines, &items, C_GETDETAILS);
|
res = tolines(bflsc, dev, &(buf[0]), &lines, &items, C_GETDETAILS);
|
||||||
if (!res)
|
if (!res)
|
||||||
return false;
|
return ok;
|
||||||
|
|
||||||
tmp = str_text(buf);
|
tmp = str_text(buf);
|
||||||
strcpy(sc_dev.getinfo, tmp);
|
strcpy(sc_dev.getinfo, tmp);
|
||||||
|
Loading…
Reference in New Issue
Block a user