On 05/21/2013 04:00 AM, Osier Yang wrote:
---
src/phyp/phyp_driver.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
ACK for being mechanical. However...
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 4594cbf..70d3adb 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -1008,7 +1008,7 @@ connected:
libssh2_session_set_blocking(session, 0);
while ((rc = libssh2_session_startup(session, sock)) ==
- LIBSSH2_ERROR_EAGAIN) ;
+ LIBSSH2_ERROR_EAGAIN);
My review of patch 30/31 made me revisit this patch. It has an empty
while loop. Should we enforce a particular style where all empty-bodied
loops should use a more obvious style to prove that we knew what we were
doing? For example:
while ((rc = libssh2_session_startup(session, sock)) ==
LIBSSH2_ERROR_EAGAIN)
; /* empty */
or
while ((rc = libssh2_session_startup(session, sock)) ==
LIBSSH2_ERROR_EAGAIN) {
/* empty */
}
If so, how would we enforce such a style?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org