Avoid compile warnings about assignment/conditional/truthvalue

This commit is contained in:
Daniel P. Berrange 2009-04-22 14:28:25 +00:00
parent 220bcb0535
commit d83ded2dba
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
Wed Apr 22 15:28:03 BST 2009 Daniel P. Berrange <berrange@redhat.com>
* 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 <berrange@redhat.com>
Use private /dev/pts instance for containers (needs 'newinstance'

View File

@ -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