[43/44] net: initialize vnet_hdr in net_init_tap()

Submitted by Mark McLoughlin on Nov. 25, 2009, 6:49 p.m.

Details

Message ID 1259174977-26212-44-git-send-email-markmc@redhat.com
State New
Headers show

Commit Message

Mark McLoughlin Nov. 25, 2009, 6:49 p.m.
net_tap_init() always sets vnet_hdr using qemu_opt_get_bool(), but
initialize it in net_init_tap() just to reduce confusion.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 net/tap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/net/tap.c b/net/tap.c
index a327a9a..0d8b424 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -378,7 +378,7 @@  static int net_tap_init(QemuOpts *opts, int *vnet_hdr)
 int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan)
 {
     TAPState *s;
-    int fd, vnet_hdr;
+    int fd, vnet_hdr = 0;
 
     if (qemu_opt_get(opts, "fd")) {
         if (qemu_opt_get(opts, "ifname") ||