Re: [PATCH 08/31] src/phyp: Remove the whitespace before '; '

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]