]> xenbits.xensource.com Git - libvirt.git/commitdiff
uml_driver: correct logic error in umlMonitorCommand
authorJim Meyering <meyering@redhat.com>
Tue, 13 Jul 2010 20:28:35 +0000 (15:28 -0500)
committerJim Meyering <meyering@redhat.com>
Wed, 14 Jul 2010 17:42:59 +0000 (12:42 -0500)
* src/uml/uml_driver.c (umlMonitorCommand): Correct flaw that would
cause unconditional "incomplete reply ..." failure, since "nbytes"
was always 0 or 1.

src/uml/uml_driver.c

index 110179e8b3ae853fd41fc3effb560248b614018e..1e0f5acf11ff16a4c59d015a4aa37a4b43de13f0 100644 (file)
@@ -730,7 +730,7 @@ static int umlMonitorCommand(const struct uml_driver *driver,
         ssize_t nbytes;
         addrlen = sizeof(addr);
         nbytes = recvfrom(priv->monitor, &res, sizeof res, 0,
-                          (struct sockaddr *)&addr, &addrlen) < 0;
+                          (struct sockaddr *)&addr, &addrlen);
         if (nbytes < 0) {
             if (errno == EAGAIN || errno == EINTR)
                 continue;