Skip to contentSkip to conversation

Fix net_check_clients warnings: make it per vlan.

PATCH Applied Tristan Gingold 3 participants 3 messages Mar 15, 2011 – Apr 1, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix net_check_clients warnings: make it per vlan.

---
 net.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
net.c +2 -1
index ddcca97..b2dfaa8 100644
@@ -1305,9 +1305,10 @@ void net_check_clients(void)
 {
     VLANState *vlan;
     VLANClientState *vc;
-    int has_nic = 0, has_host_dev = 0;
 
     QTAILQ_FOREACH(vlan, &vlans, next) {
+        int has_nic = 0, has_host_dev = 0;
+
         QTAILQ_FOREACH(vc, &vlan->clients, next) {
             switch (vc->info->type) {
             case NET_CLIENT_TYPE_NIC:
Signature · 1 line
1.7.3.GIT
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Tristan Gingold
---
 net.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
net.c +0 -0
index ddcca97..b2dfaa8 100644
@@ -1305,9 +1305,10 @@ void net_check_clients(void)
 {

net.c void net_check_clients(void) · line 1314

Quoted 10 lines
net.c +2 -1
     VLANState *vlan;
     VLANClientState *vc;
-    int has_nic = 0, has_host_dev = 0;
 
     QTAILQ_FOREACH(vlan, &vlans, next) {
+        int has_nic = 0, has_host_dev = 0;
+
         QTAILQ_FOREACH(vc, &vlan->clients, next) {
             switch (vc->info->type) {
             case NET_CLIENT_TYPE_NIC:

Screwed up in commit 62112d18 by yours truly, and papered over in commit 64e69d50 by Blue.

#2 lore raw
In reply to Tristan Gingold
Quoted 4 lines · Tristan Gingold
---
 net.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Thanks, applied.

Quoted 21 lines
net.c +2 -1
index ddcca97..b2dfaa8 100644
@@ -1305,9 +1305,10 @@ void net_check_clients(void)
 {
     VLANState *vlan;
     VLANClientState *vc;
-    int has_nic = 0, has_host_dev = 0;
 
     QTAILQ_FOREACH(vlan, &vlans, next) {
+        int has_nic = 0, has_host_dev = 0;
+
         QTAILQ_FOREACH(vc, &vlan->clients, next) {
             switch (vc->info->type) {
             case NET_CLIENT_TYPE_NIC:
Signature · 1 line
1.7.3.GIT
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net