diff options
author | Mark McLoughlin <markmc@redhat.com> | 2009-11-25 18:49:36 +0000 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-12-03 09:41:35 -0600 |
commit | df6c2a0fb2f498f488a391c5da13e7cd4de5083e (patch) | |
tree | 1129d470351871df11763c09705572254e3f4bb3 /net/tap.c | |
parent | 2e50326c44c802ca9b9d591341085e49208927be (diff) | |
download | qemu-df6c2a0fb2f498f488a391c5da13e7cd4de5083e.zip |
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/tap.c')
-rw-r--r-- | net/tap.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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") || |