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 | |
parent | 04d4a6f85863552eaedc61cfeef5681776c8bb38 (diff) |
fix randonm findings from llvm-clang-analyzer
Thanks to Lennart for the log file!
-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 | ||||
-rw-r--r-- | libudev/libudev-enumerate.c | 2 | ||||
-rw-r--r-- | udev/udev-rules.c | 2 | ||||
-rw-r--r-- | udev/udevadm-info.c | 2 |
7 files changed, 167 insertions, 170 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]; diff --git a/libudev/libudev-enumerate.c b/libudev/libudev-enumerate.c index e30a406e5a..186abb927e 100644 --- a/libudev/libudev-enumerate.c +++ b/libudev/libudev-enumerate.c @@ -559,7 +559,7 @@ static int scan_dir_and_add_devices(struct udev_enumerate *udev_enumerate, if (subdir1 != NULL) l = util_strpcpyl(&s, l, "/", subdir1, NULL); if (subdir2 != NULL) - l = util_strpcpyl(&s, l, "/", subdir2, NULL); + util_strpcpyl(&s, l, "/", subdir2, NULL); dir = opendir(path); if (dir == NULL) return -1; diff --git a/udev/udev-rules.c b/udev/udev-rules.c index bc224040d2..a85800adf2 100644 --- a/udev/udev-rules.c +++ b/udev/udev-rules.c @@ -1127,7 +1127,7 @@ static int sort_token(struct udev_rules *rules, struct rule_tmp *rule_tmp) for (i = 0; i < rule_tmp->token_cur; i++) { enum token_type next_val = TK_UNSET; - unsigned int next_idx; + unsigned int next_idx = 0; unsigned int j; /* find smallest value */ diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c index 519dc4a45b..d95091c4a4 100644 --- a/udev/udevadm-info.c +++ b/udev/udevadm-info.c @@ -60,7 +60,7 @@ static void print_all_attributes(struct udev_device *device, const char *key) value = udev_device_get_sysattr_value(device, dent->d_name); if (value == NULL) continue; - dbg(udev, "attr '%s'='%s'(%zi)\n", dent->d_name, value, len); + dbg(udev, "attr '%s'='%s'\n", dent->d_name, value); /* skip nonprintable attributes */ len = strlen(value); |