diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2014-11-26 16:49:39 +0100 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2014-11-26 16:49:39 +0100 |
commit | bb90caec1be476ce4093e72029537c8ccd38f5b3 (patch) | |
tree | b2f851519a6c80a2a9ebe98d389602cb2dfd4d31 /src/usb-device.c | |
parent | c86e130ab1af4b6161b2a71a2449d2e02109800f (diff) | |
download | 0xFFFF-bb90caec1be476ce4093e72029537c8ccd38f5b3.tar.bz2 |
all: Fix overflow in shift operators
Diffstat (limited to 'src/usb-device.c')
-rw-r--r-- | src/usb-device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usb-device.c b/src/usb-device.c index 4fb011a..a4b1f8b 100644 --- a/src/usb-device.c +++ b/src/usb-device.c @@ -384,7 +384,7 @@ void usb_switch_to_update(struct usb_device_info * dev) { leave_cold_flash(dev); else if ( dev->flash_device->protocol == FLASH_NOLO ) nolo_boot_device(dev, "update"); - else if ( dev->flash_device->protocol == FLASH_MKII && ! ( dev->data & ( 1 << 31 ) ) ) + else if ( dev->flash_device->protocol == FLASH_MKII && ! ( dev->data & ( 1UL << 31 ) ) ) mkii_reboot_device(dev); else if ( dev->flash_device->protocol == FLASH_DISK ) printf_and_wait("Unplug USB cable, turn device off, press ENTER and plug USB cable again"); @@ -401,7 +401,7 @@ void usb_switch_to_disk(struct usb_device_info * dev) { nolo_boot_device(dev, NULL); printf_and_wait("Wait until device start, choose USB Mass Storage Mode and press ENTER"); } else if ( dev->flash_device->protocol == FLASH_MKII ) { - if ( dev->data & ( 1 << 31 ) ) + if ( dev->data & ( 1UL << 31 ) ) mkii_reboot_device(dev); else printf_and_wait("Unplug USB cable, plug again, choose USB Mass Storage Mode and press ENTER"); |