]> xenbits.xensource.com Git - libvirt.git/commitdiff
wrong open() failure detection
authorDaniel Veillard <veillard@redhat.com>
Fri, 25 Jul 2008 08:42:05 +0000 (08:42 +0000)
committerDaniel Veillard <veillard@redhat.com>
Fri, 25 Jul 2008 08:42:05 +0000 (08:42 +0000)
* src/qemu_driver.c: Guido Trotter pointed out a wrong open() failure
  detection
Daniel

ChangeLog
src/qemu_driver.c

index ed46fec13500c40dd5ee4ce4b9a0c583ba14e338..09de626ac6b4ece3206eb17d73580d53eef81648 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jul 25 10:39:54 CEST 2008 Daniel Veillard <veillard@redhat.com>
+
+       * src/qemu_driver.c: Guido Trotter pointed out a wrong open() failure
+         detection
+
 Fri Jul 25 08:36:18 CEST 2008 Daniel Veillard <veillard@redhat.com>
 
        * docs/libvirt.rng: patch from John Levon fixing various patterns
index f706819547177d74d24ba29a434abcf1daa9262c..9bd059a45ee91f53413cb2c258008a26daaf219d 100644 (file)
@@ -504,7 +504,7 @@ static int qemudOpenMonitor(virConnectPtr conn,
     char buf[1024];
     int ret = -1;
 
-    if (!(monfd = open(monitor, O_RDWR))) {
+    if ((monfd = open(monitor, O_RDWR)) < 0) {
         qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
                          _("Unable to open monitor path %s"), monitor);
         return -1;