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 | |
| parent | 2e50326c44c802ca9b9d591341085e49208927be (diff) | |
| download | focaccia-qemu-df6c2a0fb2f498f488a391c5da13e7cd4de5083e.tar.gz focaccia-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>
| -rw-r--r-- | net/tap.c | 2 |
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") || |