projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2dc7fdf
)
usb: mtp: avoid empty description string
author
Gerd Hoffmann
<kraxel@redhat.com>
Fri, 25 Apr 2014 10:06:47 +0000
(12:06 +0200)
committer
Gerd Hoffmann
<kraxel@redhat.com>
Mon, 5 May 2014 10:57:49 +0000
(12:57 +0200)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/usb/dev-mtp.c
patch
|
blob
|
history
diff --git
a/hw/usb/dev-mtp.c
b/hw/usb/dev-mtp.c
index 45f9562c6099efae6de489413481c6417f2411dd..a30a88639c3cc1226c16bbfecf08ed892ba9142e 100644
(file)
--- a/
hw/usb/dev-mtp.c
+++ b/
hw/usb/dev-mtp.c
@@
-1046,7
+1046,7
@@
static int usb_mtp_initfn(USBDevice *dev)
QTAILQ_INIT(&s->objects);
if (s->desc == NULL) {
s->desc = strrchr(s->root, '/');
- if (s->desc) {
+ if (s->desc
&& s->desc[0]
) {
s->desc = g_strdup(s->desc + 1);
} else {
s->desc = g_strdup("none");