summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2009-04-22 14:28:25 +0000
committerDaniel P. Berrange <berrange@redhat.com>2009-04-22 14:28:25 +0000
commitd83ded2dba51e21c47151d626d0f018ba773cbaa (patch)
treeeac90fdd098c34223a967ba92e30e19fb0304b4c
parentUse a private /dev/pts instance in containers if kernel is new enough (diff)
downloadlibvirt-d83ded2dba51e21c47151d626d0f018ba773cbaa.tar.gz
libvirt-d83ded2dba51e21c47151d626d0f018ba773cbaa.tar.bz2
libvirt-d83ded2dba51e21c47151d626d0f018ba773cbaa.zip
Avoid compile warnings about assignment/conditional/truthvalue
-rw-r--r--ChangeLog6
-rw-r--r--src/network_conf.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2dfcadeef..7c54074a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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