Browse Source

Merge pull request #352 from kanoi/api

usbutils.c uninitialised usbstat for non-primary mmqs
nfactor-troky
Con Kolivas 12 years ago
parent
commit
634958ff1c
  1. 3
      usbutils.c

3
usbutils.c

@ -1061,6 +1061,9 @@ static void newstats(struct cgpu_info *cgpu) @@ -1061,6 +1061,9 @@ static void newstats(struct cgpu_info *cgpu)
void update_usb_stats(__maybe_unused struct cgpu_info *cgpu)
{
#if DO_USB_STATS
if (cgpu->usbstat < 1)
newstats(cgpu);
// we don't know the device_id until after add_cgpu()
usb_stats[cgpu->usbstat - 1].device_id = cgpu->device_id;
#endif

Loading…
Cancel
Save