diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2009-04-22 14:28:25 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2009-04-22 14:28:25 +0000 |
commit | d83ded2dba51e21c47151d626d0f018ba773cbaa (patch) | |
tree | eac90fdd098c34223a967ba92e30e19fb0304b4c | |
parent | Use a private /dev/pts instance in containers if kernel is new enough (diff) | |
download | libvirt-d83ded2dba51e21c47151d626d0f018ba773cbaa.tar.gz libvirt-d83ded2dba51e21c47151d626d0f018ba773cbaa.tar.bz2 libvirt-d83ded2dba51e21c47151d626d0f018ba773cbaa.zip |
Avoid compile warnings about assignment/conditional/truthvalue
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/network_conf.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -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' diff --git a/src/network_conf.c b/src/network_conf.c index e962c1ad4..b4da3fb09 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 |