[libvirt] [PATCH 08/31] src/phyp: Remove the whitespace before '; '
Eric Blake
eblake at redhat.com
Tue May 21 15:37:08 UTC 2013
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130521/1d8832a3/attachment-0001.sig>
More information about the libvir-list
mailing list