From: Jim Meyering Date: Tue, 13 Jul 2010 20:28:35 +0000 (-0500) Subject: uml_driver: correct logic error in umlMonitorCommand X-Git-Tag: v0.8.3~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60ef6d632226482e480f0fc917785f6d11cb7a1b;p=thirdparty%2Flibvirt.git uml_driver: correct logic error in umlMonitorCommand * src/uml/uml_driver.c (umlMonitorCommand): Correct flaw that would cause unconditional "incomplete reply ..." failure, since "nbytes" was always 0 or 1. --- diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index 110179e8b3..1e0f5acf11 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -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;