mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
usbutils.c uninitialised usbstat for non-primary mmqs
This commit is contained in:
parent
43be78cca5
commit
e6efec46e9
@ -1061,6 +1061,9 @@ static void newstats(struct cgpu_info *cgpu)
|
|||||||
void update_usb_stats(__maybe_unused struct cgpu_info *cgpu)
|
void update_usb_stats(__maybe_unused struct cgpu_info *cgpu)
|
||||||
{
|
{
|
||||||
#if DO_USB_STATS
|
#if DO_USB_STATS
|
||||||
|
if (cgpu->usbstat < 1)
|
||||||
|
newstats(cgpu);
|
||||||
|
|
||||||
// we don't know the device_id until after add_cgpu()
|
// we don't know the device_id until after add_cgpu()
|
||||||
usb_stats[cgpu->usbstat - 1].device_id = cgpu->device_id;
|
usb_stats[cgpu->usbstat - 1].device_id = cgpu->device_id;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user