From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5IMP-000224-Fi for qemu-devel@nongnu.org; Mon, 20 Jan 2014 12:10:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5IMF-00023M-Gx for qemu-devel@nongnu.org; Mon, 20 Jan 2014 12:10:05 -0500 Received: from mail-ee0-x22f.google.com ([2a00:1450:4013:c00::22f]:57918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5IMF-00023B-9z for qemu-devel@nongnu.org; Mon, 20 Jan 2014 12:09:55 -0500 Received: by mail-ee0-f47.google.com with SMTP id d49so2788786eek.6 for ; Mon, 20 Jan 2014 09:09:54 -0800 (PST) From: Vincenzo Maffione Date: Mon, 20 Jan 2014 18:07:01 +0100 Message-Id: <1390237625-29304-2-git-send-email-v.maffione@gmail.com> In-Reply-To: <1390237625-29304-1-git-send-email-v.maffione@gmail.com> References: <1390237625-29304-1-git-send-email-v.maffione@gmail.com> Subject: [Qemu-devel] [PATCH v3 1/5] net: change vnet-hdr TAP prototypes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@amazon.com, marcel.a@redhat.com, jasowang@redhat.com, Vincenzo Maffione , lcapitulino@redhat.com, stefanha@redhat.com, dmitry@daynix.com, pbonzini@redhat.com, g.lettieri@iet.unipi.it, rizzo@iet.unipi.it The tap_has_vnet_hdr() and tap_has_vnet_hdr_len() functions used to return int, even though they only return true/false values. This patch changes the prototypes to return bool. Signed-off-by: Vincenzo Maffione --- include/net/tap.h | 4 ++-- net/tap-win32.c | 8 ++++---- net/tap.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/net/tap.h b/include/net/tap.h index a994f20..a3490a9 100644 --- a/include/net/tap.h +++ b/include/net/tap.h @@ -30,8 +30,8 @@ #include "qapi-types.h" bool tap_has_ufo(NetClientState *nc); -int tap_has_vnet_hdr(NetClientState *nc); -int tap_has_vnet_hdr_len(NetClientState *nc, int len); +bool tap_has_vnet_hdr(NetClientState *nc); +bool tap_has_vnet_hdr_len(NetClientState *nc, int len); void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr); void tap_set_offload(NetClientState *nc, int csum, int tso4, int tso6, int ecn, int ufo); void tap_set_vnet_hdr_len(NetClientState *nc, int len); diff --git a/net/tap-win32.c b/net/tap-win32.c index 91e9e84..edf26c4 100644 --- a/net/tap-win32.c +++ b/net/tap-win32.c @@ -727,9 +727,9 @@ bool tap_has_ufo(NetClientState *nc) return false; } -int tap_has_vnet_hdr(NetClientState *nc) +bool tap_has_vnet_hdr(NetClientState *nc) { - return 0; + return false; } int tap_probe_vnet_hdr_len(int fd, int len) @@ -755,9 +755,9 @@ struct vhost_net *tap_get_vhost_net(NetClientState *nc) return NULL; } -int tap_has_vnet_hdr_len(NetClientState *nc, int len) +bool tap_has_vnet_hdr_len(NetClientState *nc, int len) { - return 0; + return false; } void tap_set_vnet_hdr_len(NetClientState *nc, int len) diff --git a/net/tap.c b/net/tap.c index 39c1cda..c805f3c 100644 --- a/net/tap.c +++ b/net/tap.c @@ -219,7 +219,7 @@ bool tap_has_ufo(NetClientState *nc) return s->has_ufo; } -int tap_has_vnet_hdr(NetClientState *nc) +bool tap_has_vnet_hdr(NetClientState *nc) { TAPState *s = DO_UPCAST(TAPState, nc, nc); @@ -228,13 +228,13 @@ int tap_has_vnet_hdr(NetClientState *nc) return !!s->host_vnet_hdr_len; } -int tap_has_vnet_hdr_len(NetClientState *nc, int len) +bool tap_has_vnet_hdr_len(NetClientState *nc, int len) { TAPState *s = DO_UPCAST(TAPState, nc, nc); assert(nc->info->type == NET_CLIENT_OPTIONS_KIND_TAP); - return tap_probe_vnet_hdr_len(s->fd, len); + return !!tap_probe_vnet_hdr_len(s->fd, len); } void tap_set_vnet_hdr_len(NetClientState *nc, int len) -- 1.8.5.2