[libvirt] [PATCH 1/4] character device: Allow character devices to have different target types

Richard W.M. Jones rjones at redhat.com
Wed Nov 4 11:19:23 UTC 2009


On Tue, Nov 03, 2009 at 04:07:38PM +0000, Matthew Booth wrote:
> @@ -1325,6 +1332,7 @@ virDomainChrDefParseXML(virConnectPtr conn,
>      char *path = NULL;
>      char *mode = NULL;
>      char *protocol = NULL;
> +    const char *targetType = NULL;
>      virDomainChrDefPtr def;
>  
>      if (VIR_ALLOC(def) < 0) {

Patch looks good to me.  I'm going to be a bit picky though and say
that if you unconditionally initialize variables when they are
declared, as in the hunk above, then you prevent the compiler from
detecting when you use a variable without first initializing it.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw




More information about the libvir-list mailing list