diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-09-08 22:11:04 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-09-08 22:11:04 +0200 |
commit | 78715f65c92a8892960e2a5fce945496939f8599 (patch) | |
tree | d18981188262514cf5be98702f4cd8bf3b5b39f1 /extras | |
parent | 04d4a6f85863552eaedc61cfeef5681776c8bb38 (diff) |
fix randonm findings from llvm-clang-analyzer
Thanks to Lennart for the log file!
Diffstat (limited to 'extras')
-rw-r--r-- | extras/collect/collect.c | 2 | ||||
-rw-r--r-- | extras/fstab_import/fstab_import.c | 4 | ||||
-rw-r--r-- | extras/modem-modeswitch/ma8280p_us.c | 322 | ||||
-rw-r--r-- | extras/scsi_id/scsi_serial.c | 3 |
4 files changed, 164 insertions, 167 deletions
diff --git a/extras/collect/collect.c b/extras/collect/collect.c index c4523f1d18..0069dea0df 100644 --- a/extras/collect/collect.c +++ b/extras/collect/collect.c @@ -331,8 +331,8 @@ static void everybody(void) case STATE_CONFIRMED: state = "confirmed"; break; - fprintf(stderr, "ID: %s=%s\n", him->name, state); } + fprintf(stderr, "ID: %s=%s\n", him->name, state); } } diff --git a/extras/fstab_import/fstab_import.c b/extras/fstab_import/fstab_import.c index 98ee75f174..c66bffb25c 100644 --- a/extras/fstab_import/fstab_import.c +++ b/extras/fstab_import/fstab_import.c @@ -152,7 +152,7 @@ int main(int argc, char *argv[]) pos[0] = '\0'; label = str; } - if (matches_device_list(udev, devices, str)) { + if (matches_device_list(udev, devices, label)) { print_fstab_entry(udev, mnt); rc = 0; break; @@ -176,7 +176,7 @@ int main(int argc, char *argv[]) pos[0] = '\0'; uuid = str; } - if (matches_device_list(udev, devices, str)) { + if (matches_device_list(udev, devices, uuid)) { print_fstab_entry(udev, mnt); rc = 0; break; diff --git a/extras/modem-modeswitch/ma8280p_us.c b/extras/modem-modeswitch/ma8280p_us.c index 3cf9eb9eb2..d7cf4f4b3f 100644 --- a/extras/modem-modeswitch/ma8280p_us.c +++ b/extras/modem-modeswitch/ma8280p_us.c @@ -103,7 +103,7 @@ static void msleep(long msec) int ma8280p_switch (struct usb_dev_handle *devh, struct usb_device *dev) { int ret = 1; - char *buf = NULL; + char *buf = NULL; buf = malloc (65535); if (!buf) { @@ -111,350 +111,350 @@ int ma8280p_switch (struct usb_dev_handle *devh, struct usb_device *dev) return -1; } - ret = usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012); + usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012); msleep(6); - ret = usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012); + usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012); msleep(6); - ret = usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000400); + usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000400); msleep(10); ret = usb_release_interface(devh, 0); if (ret != 0) debug ("%s: failed to release interface before set_configuration: %d", dev->filename, ret); - ret = usb_set_configuration(devh, 0x0000001); + usb_set_configuration(devh, 0x0000001); ret = usb_claim_interface(devh, 0); if (ret != 0) debug ("%s: claim after set_configuration failed with error %d", dev->filename, ret); - //ret = usb_set_altinterface(devh, 0); + //usb_set_altinterface(devh, 0); //msleep(33); - ret = usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE + USB_ENDPOINT_IN, 0x0000001, 0x0000300, 0x0000000, buf, 0x0000008, 1000); + usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE + USB_ENDPOINT_IN, 0x0000001, 0x0000300, 0x0000000, buf, 0x0000008, 1000); msleep(5); memcpy(buf, "\xb0\x04\x00\x00\x02\x90\x26\x86", 0x0000008); - ret = usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x0000009, 0x0000300, 0x0000000, buf, 0x0000008, 1000); + usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x0000009, 0x0000300, 0x0000000, buf, 0x0000008, 1000); msleep(4); memcpy(buf, "\xb0\x04\x00\x00\x02\x90\x26\x86", 0x0000008); - ret = usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x0000009, 0x0000300, 0x0000000, buf, 0x0000008, 1000); + usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x0000009, 0x0000300, 0x0000000, buf, 0x0000008, 1000); msleep(4); msleep(4); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(6); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(1); //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped msleep(4); memcpy(buf, "\x37\x01\xfe\xdb\xc1\x33\x1f\x83", 0x0000008); - ret = usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); + usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); msleep(3); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(1); memcpy(buf, "\x37\x0e\xb5\x9d\x3b\x8a\x91\x51", 0x0000008); - ret = usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); + usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); msleep(7); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(1); memcpy(buf, "\x34\x87\xba\x0d\xfc\x8a\x91\x51", 0x0000008); - ret = usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); + usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); msleep(7); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(2); //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped msleep(4); memcpy(buf, "\x37\x01\xfe\xdb\xc1\x33\x1f\x83", 0x0000008); - ret = usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); + usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); msleep(2); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(1); memcpy(buf, "\x37\x0e\xb5\x9d\x3b\x8a\x91\x51", 0x0000008); - ret = usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); + usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); msleep(7); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(1); memcpy(buf, "\x34\x87\xba\x0d\xfc\x8a\x91\x51", 0x0000008); - ret = usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); + usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); msleep(7); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(8); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(1); //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped msleep(4); memcpy(buf, "\x33\x04\xfe\x00\xf4\x6c\x1f\xf0", 0x0000008); - ret = usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); + usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); msleep(3); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); msleep(1); //URB_FUNCTION_GET_STATUS_FROM_ENDPOINT skipped msleep(4); memcpy(buf, "\x32\x07\xfe\xf0\x29\xb9\x3a\xf0", 0x0000008); - ret = usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); + usb_interrupt_write(devh, 0x00000002, buf, 0x0000008, 1000); msleep(3); - ret = usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); + usb_interrupt_read(devh, 0x00000081, buf, 0x0000008, 1000); if (buf) free (buf); diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c index 2e9168f941..7b308a935c 100644 --- a/extras/scsi_id/scsi_serial.c +++ b/extras/scsi_id/scsi_serial.c @@ -170,7 +170,6 @@ static int scsi_dump_sense(struct udev *udev, int code; int sense_class; int sense_key; - int descriptor_format; int asc, ascq; #ifdef DUMP_SENSE char out_buffer[256]; @@ -210,7 +209,6 @@ static int scsi_dump_sense(struct udev *udev, return -1; } if ((code == 0x0) || (code == 0x1)) { - descriptor_format = 0; sense_key = sense_buffer[2] & 0xf; if (s < 14) { /* @@ -223,7 +221,6 @@ static int scsi_dump_sense(struct udev *udev, asc = sense_buffer[12]; ascq = sense_buffer[13]; } else if ((code == 0x2) || (code == 0x3)) { - descriptor_format = 1; sense_key = sense_buffer[1] & 0xf; asc = sense_buffer[2]; ascq = sense_buffer[3]; |