]> Git Repo - qemu.git/commitdiff
usb-host: Drop superfluous null test from usb_host_auto_scan()
authorMarkus Armbruster <[email protected]>
Thu, 10 Jan 2013 13:33:24 +0000 (14:33 +0100)
committerGerd Hoffmann <[email protected]>
Mon, 14 Jan 2013 11:47:11 +0000 (12:47 +0100)
Coverity points out that port is later passed to usb_host_open(),
which dereferences it.  It actually can't be null: it always points to
usb_host_scan()'s auto port[].  Drop the superfluous port == NULL
test.

Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
hw/usb/host-linux.c

index e8e6a42fb9582600b120266a88d4fab502cf6646..a498840e0a2d5ca6f60ca9769ad076c90df42e40 100644 (file)
@@ -1760,7 +1760,7 @@ static int usb_host_auto_scan(void *opaque, int bus_num,
         if (f->addr > 0 && f->addr != addr) {
             continue;
         }
-        if (f->port != NULL && (port == NULL || strcmp(f->port, port) != 0)) {
+        if (f->port != NULL && strcmp(f->port, port) != 0) {
             continue;
         }
 
This page took 0.028271 seconds and 4 git commands to generate.