Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/net/lib/libvirtif fix warnings



details:   https://anonhg.NetBSD.org/src/rev/e30559f282f6
branches:  trunk
changeset: 787803:e30559f282f6
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Jul 04 09:48:01 2013 +0000

description:
fix warnings

diffstat:

 sys/rump/net/lib/libvirtif/rumpcomp_user.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 39320b7c6e68 -r e30559f282f6 sys/rump/net/lib/libvirtif/rumpcomp_user.c
--- a/sys/rump/net/lib/libvirtif/rumpcomp_user.c        Thu Jul 04 09:39:48 2013 +0000
+++ b/sys/rump/net/lib/libvirtif/rumpcomp_user.c        Thu Jul 04 09:48:01 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpcomp_user.c,v 1.6 2013/05/20 10:24:26 pooka Exp $  */
+/*     $NetBSD: rumpcomp_user.c,v 1.7 2013/07/04 09:48:01 pooka Exp $  */
 
 /*
  * Copyright (c) 2013 Antti Kantee.  All Rights Reserved.
@@ -36,6 +36,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 #ifdef __linux__
 #include <net/if.h>
@@ -44,6 +45,8 @@
 
 #include <rump/rumpuser_component.h>
 
+#include "rumpcomp_user.h"
+
 struct virtif_user {
        int viu_fd;
        int viu_dying;
@@ -150,8 +153,11 @@
        pfd.events = POLLIN;
 
        for (;;) {
-               if (viu->viu_dying)
+               if (viu->viu_dying) {
+                       rv = 0;
+                       *rcv = 0;
                        break;
+               }
 
                prv = poll(&pfd, 1, POLLTIMO_MS);
                if (prv == 0)



Home | Main Index | Thread Index | Old Index