From: Daniel P. Berrange Date: Wed, 22 Apr 2009 14:28:25 +0000 (+0000) Subject: Avoid compile warnings about assignment/conditional/truthvalue X-Git-Tag: LIBVIRT_0_6_3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d83ded2dba51e21c47151d626d0f018ba773cbaa;p=thirdparty%2Flibvirt.git Avoid compile warnings about assignment/conditional/truthvalue --- diff --git a/ChangeLog b/ChangeLog index 2dfcadeef3..7c54074a9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Apr 22 15:28:03 BST 2009 Daniel P. Berrange + + * src/network_driver.c: Explicit check for NULL, to avoid + compiler complaining about "assignment treated as truth value + in conditional". + Wed Apr 22 15:27:03 BST 2009 Daniel P. Berrange Use private /dev/pts instance for containers (needs 'newinstance' diff --git a/src/network_conf.c b/src/network_conf.c index e962c1ad4d..b4da3fb090 100644 --- a/src/network_conf.c +++ b/src/network_conf.c @@ -748,7 +748,7 @@ virNetworkObjPtr virNetworkLoadConfig(virConnectPtr conn, /* Generate a bridge if none is found, but don't check for collisions * if a bridge is hardcoded, so the network is at least defined */ - if (tmp = virNetworkAllocateBridge(conn, nets, def->bridge)) { + if ((tmp = virNetworkAllocateBridge(conn, nets, def->bridge)) != NULL) { VIR_FREE(def->bridge); def->bridge = tmp; } else