summaryrefslogtreecommitdiff
path: root/net/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/net.c b/net/net.c
index 9db4dba769..0ff2e40f35 100644
--- a/net/net.c
+++ b/net/net.c
@@ -633,7 +633,7 @@ int qemu_find_net_clients_except(const char *id, NetClientState **ncs,
if (nc->info->type == type) {
continue;
}
- if (!strcmp(nc->name, id)) {
+ if (!id || !strcmp(nc->name, id)) {
if (ret < max) {
ncs[ret] = nc;
}