From 60ef6d632226482e480f0fc917785f6d11cb7a1b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 13 Jul 2010 15:28:35 -0500 Subject: [PATCH] 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. --- src/uml/uml_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;