Skip to contentSkip to conversation

usb-bus: fix no params

PATCH Applied TeLeMan 2 participants 2 messages Mar 30, 2010 – Apr 2, 2010

lore
Share & tools
lore

TeLeMan

author
#0 lore raw

PATCH v2 1/1 usb-bus: fix no params

After commit 702f3e0fb52c124c07f215426eeadb70a716643f, the params is nerver NULL. It should check *params instead of params to determine whether the params is empty.

---
 hw/usb-bus.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/usb-bus.c +1 -1
index ce8a694..ee0e9e3 100644
@@ -299,7 +299,7 @@ USBDevice *usbdevice_create(const char *cmdline)
     }
 
     if (!usb->usbdevice_init) {
-        if (params) {
+        if (*params) {
             error_report("usbdevice %s accepts no params", driver);
             return NULL;
         }
Signature · 4 lines
1.6.5.1.1367.gcd48

--
SUN OF A BEACH
#1 lore raw
Quoted 5 lines · TeLeMan

After commit 702f3e0fb52c124c07f215426eeadb70a716643f, the params is nerver NULL. It should check *params instead of params to determine whether the params is empty.

Thanks, applied.

Quoted 25 lines
---
 hw/usb-bus.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/usb-bus.c +1 -1
index ce8a694..ee0e9e3 100644
@@ -299,7 +299,7 @@ USBDevice *usbdevice_create(const char *cmdline)
     }
 
     if (!usb->usbdevice_init) {
-        if (params) {
+        if (*params) {
             error_report("usbdevice %s accepts no params", driver);
             return NULL;
         }
Signature · 4 lines
1.6.5.1.1367.gcd48

--
SUN OF A BEACH
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net