qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] hw: set_netdev: make peers an empty


From: Li Qiang
Subject: [Qemu-devel] [PATCH] hw: set_netdev: make peers an empty
Date: Thu, 8 Nov 2018 06:33:06 -0800

Though there is no inconsistency between 'queues'
and 'peers[i]' currently, this makes the 'peers[i] == NULL'
meaningful.

Signed-off-by: Li Qiang <address@hidden>
---
 hw/core/qdev-properties-system.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
index 8b22fb51c9..74004a2f33 100644
--- a/hw/core/qdev-properties-system.c
+++ b/hw/core/qdev-properties-system.c
@@ -257,7 +257,7 @@ static void set_netdev(Object *obj, Visitor *v, const char 
*name,
     Property *prop = opaque;
     NICPeers *peers_ptr = qdev_get_prop_ptr(dev, prop);
     NetClientState **ncs = peers_ptr->ncs;
-    NetClientState *peers[MAX_QUEUE_NUM];
+    NetClientState *peers[MAX_QUEUE_NUM] = {NULL};
     Error *local_err = NULL;
     int queues, err = 0, i = 0;
     char *str;
-- 
2.17.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]