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.
This commit is contained in:
Jim Meyering 2010-07-13 15:28:35 -05:00
parent c1fd7d7b3e
commit 60ef6d6322

View 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;