From: Mark McLoughlin Date: Wed, 25 Nov 2009 18:49:36 +0000 (+0000) Subject: net: initialize vnet_hdr in net_init_tap() X-Git-Tag: v0.12.0-rc0~128 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df6c2a0fb2f498f488a391c5da13e7cd4de5083e;p=thirdparty%2Fqemu.git 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 Signed-off-by: Anthony Liguori --- diff --git a/net/tap.c b/net/tap.c index a327a9a6bf4..0d8b4241232 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") ||