Merge remote-tracking branch 'stefanha/trivial-patches' into staging
diff --git a/acl.c b/acl.c
index 0654f38..e840b9b 100644
--- a/acl.c
+++ b/acl.c
@@ -95,13 +95,13 @@
void qemu_acl_reset(qemu_acl *acl)
{
- qemu_acl_entry *entry;
+ qemu_acl_entry *entry, *next_entry;
/* Put back to deny by default, so there is no window
* of "open access" while the user re-initializes the
* access control list */
acl->defaultDeny = 1;
- QTAILQ_FOREACH(entry, &acl->entries, next) {
+ QTAILQ_FOREACH_SAFE(entry, &acl->entries, next, next_entry) {
QTAILQ_REMOVE(&acl->entries, entry, next);
free(entry->match);
free(entry);
diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt
index f345866..c0a9325 100644
--- a/docs/qapi-code-gen.txt
+++ b/docs/qapi-code-gen.txt
@@ -41,7 +41,7 @@
example of a complex type is:
{ 'type': 'MyType',
- 'data' { 'member1': 'str', 'member2': 'int', '*member3': 'str } }
+ 'data': { 'member1': 'str', 'member2': 'int', '*member3': 'str' } }
The use of '*' as a prefix to the name means the member is optional. Optional
members should always be added to the end of the dictionary to preserve
@@ -63,7 +63,7 @@
{ 'command': 'my-command',
'data': { 'arg1': 'str', '*arg2': 'str' },
- 'returns': 'str' ]
+ 'returns': 'str' }
Command names should be all lower case with words separated by a hyphen.
diff --git a/hw/sysbus.c b/hw/sysbus.c
index 4fab5a4..fd2fc6a 100644
--- a/hw/sysbus.c
+++ b/hw/sysbus.c
@@ -198,6 +198,7 @@
sysbus_connect_irq(s, n, irq);
n++;
}
+ va_end(va);
return dev;
}
@@ -229,6 +230,7 @@
sysbus_connect_irq(s, n, irq);
n++;
}
+ va_end(va);
return dev;
}
diff --git a/net/tap-linux.c b/net/tap-linux.c
index ff8cad0..41d581b 100644
--- a/net/tap-linux.c
+++ b/net/tap-linux.c
@@ -73,7 +73,11 @@
pstrcpy(ifr.ifr_name, IFNAMSIZ, "tap%d");
ret = ioctl(fd, TUNSETIFF, (void *) &ifr);
if (ret != 0) {
- error_report("could not configure %s (%s): %m", PATH_NET_TUN, ifr.ifr_name);
+ if (ifname[0] != '\0') {
+ error_report("could not configure %s (%s): %m", PATH_NET_TUN, ifr.ifr_name);
+ } else {
+ error_report("could not configure %s: %m", PATH_NET_TUN);
+ }
close(fd);
return -1;
}