diff mbox

Fix net_check_clients warnings: make it per vlan.

Message ID 1300195254-52519-1-git-send-email-gingold@adacore.com
State New
Headers show

Commit Message

Tristan Gingold March 15, 2011, 1:20 p.m. UTC
Signed-off-by: Tristan Gingold <gingold@adacore.com>
---
 net.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Markus Armbruster March 16, 2011, 7:04 a.m. UTC | #1
Tristan Gingold <gingold@adacore.com> writes:

> Signed-off-by: Tristan Gingold <gingold@adacore.com>
> ---
>  net.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/net.c b/net.c
> index ddcca97..b2dfaa8 100644
> --- a/net.c
> +++ b/net.c
> @@ -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:

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

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Aurelien Jarno April 1, 2011, 8:32 p.m. UTC | #2
On Tue, Mar 15, 2011 at 02:20:54PM +0100, Tristan Gingold wrote:
> Signed-off-by: Tristan Gingold <gingold@adacore.com>
> ---
>  net.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Thanks, applied.

> diff --git a/net.c b/net.c
> index ddcca97..b2dfaa8 100644
> --- a/net.c
> +++ b/net.c
> @@ -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:
> -- 
> 1.7.3.GIT
> 
> 
>
diff mbox

Patch

diff --git a/net.c b/net.c
index ddcca97..b2dfaa8 100644
--- a/net.c
+++ b/net.c
@@ -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: