aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2009-11-25 18:49:36 +0000
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-03 09:41:35 -0600
commitdf6c2a0fb2f498f488a391c5da13e7cd4de5083e (patch)
tree1129d470351871df11763c09705572254e3f4bb3 /net
parent2e50326c44c802ca9b9d591341085e49208927be (diff)
net: initialize vnet_hdr in net_init_tap()
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> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'net')
-rw-r--r--net/tap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tap.c b/net/tap.c
index a327a9a6bf..0d8b424123 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") ||