diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2012-09-22 23:59:15 +0200 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2012-09-22 23:59:15 +0200 |
commit | 15b05dce75b8a2195e5ba613e157fd308bc9f03f (patch) | |
tree | 9a18f0b9bceedf35255ca1710f810316e3c27b07 | |
parent | e4b4d211c1ffd199f49e94cd799157f1c825dbf1 (diff) | |
download | 0xFFFF-15b05dce75b8a2195e5ba613e157fd308bc9f03f.tar.bz2 |
nolo: Fix nolo_send_image
-rw-r--r-- | src/nolo.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -240,12 +240,14 @@ static int nolo_send_image(struct usb_device_info * dev, struct image * image, i int i; uint8_t len; char buf[9]; - char ** bufs; + char ** bufs = NULL; struct device_list * device = image->devices; - while ( device ) + while ( device ) { if ( device->device == dev->detected_device && hwrev_is_valid(device->hwrevs, dev->detected_hwrev) ) break; + device = device->next; + } if ( device ) bufs = device_list_alloc_to_bufs(device); |