all: Fix overflow in shift operators

This commit is contained in:
Pali Rohár committed 2014-11-26 16:49:39 +01:00
1 parent c86e130ab1
commit bb90caec1b
4 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -180,7 +180,7 @@ int dev_flash_image(struct device_info * dev, struct image * image) {
usb_switch_to_update(dev->usb);
return -EAGAIN;
} else if ( protocol == FLASH_MKII ) {
if ( dev->usb->data & (1 << image->type) )
if ( dev->usb->data & (1UL << image->type) )
return mkii_flash_image(dev->usb, image);
}