[Libvir] PATCH: Fix uninitialized variable & bridge setup

Two crazy bugs - I forgot an =0 initialization in a recent patch to deal with qemu startup - If you don't have any virtual networks defined, then libvirt_qemud will never called brctlInit() so trying to start a guest using bridged network will get EINVAL. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

Daniel P. Berrange wrote:
Two crazy bugs
ACK to both, but ...
- I forgot an =0 initialization in a recent patch to deal with qemu startup
@@ -246,7 +246,7 @@ static int qemudExtractVersionInfo(const _exit(-1); /* Just in case */ } else { /* Parent */ char help[8192]; /* Ought to be enough to hold QEMU help screen */ - int got, ret = -1; + int got = 0, ret = -1; int major, minor, micro;
if (close(newstdout[1]) < 0)
... I'm really surprised that gcc doesn't warn about this one. I'm always compiling with full warnings and -Werror. Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903
participants (2)
-
Daniel P. Berrange
-
Richard W.M. Jones