On 02/17/2016 05:35 AM, P J P wrote:
> From: Prasad J Pandit <p...@fedoraproject.org>
> 
> Due indentation and braces were missing at places, added them.
> 

Cleaning up existing code is best done as part of a series that is
otherwise touching the code; doing it in isolation makes 'git blame'
attribute the wrong author for no good reason.

> Signed-off-by: Prasad J Pandit <p...@fedoraproject.org>
> ---
>  net/checksum.c | 20 +++++++++++---------
>  1 file changed, 11 insertions(+), 9 deletions(-)
> 
> diff --git a/net/checksum.c b/net/checksum.c
> index e51698c..a8c47e3 100644
> --- a/net/checksum.c
> +++ b/net/checksum.c
> @@ -38,8 +38,9 @@ uint32_t net_checksum_add_cont(int len, uint8_t *buf, int 
> seq)
>  
>  uint16_t net_checksum_finish(uint32_t sum)
>  {
> -    while (sum>>16)
> -     sum = (sum & 0xFFFF)+(sum >> 16);
> +    while (sum>>16) {
> +        sum = (sum & 0xFFFF)+(sum >> 16);

If we DO decide the touch-up is worth it, please add spaces around the
binary + as part of the cleanup.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to