Re: [PATCH 2/4] Remove extra braces from single line if conditionals

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

 



On 07-03-17, 22:48, Michael Sartain wrote:
> Fixes checkpatch warning:
>   braces {} are not necessary for any arm of this statement

Well checkpatch isn't supposed to be run on userspace example code.
But anyway, I am fine with the improvements.

> Signed-off-by: Michael Sartain <mikesart@xxxxxxxxxxxx>
> ---
>  drivers/staging/greybus/Documentation/firmware/firmware.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git drivers/staging/greybus/Documentation/firmware/firmware.c drivers/staging/greybus/Documentation/firmware/firmware.c
> index 10ef86120815..70b7fcbba5ad 100644
> --- drivers/staging/greybus/Documentation/firmware/firmware.c
> +++ drivers/staging/greybus/Documentation/firmware/firmware.c
> @@ -217,13 +217,12 @@ int main(int argc, char *argv[])
>  	if (argc > 2)
>  		sscanf(argv[2], "%u", &fw_update_type);
>  
> -	if (argc > 3) {
> +	if (argc > 3)
>  		firmware_tag = argv[3];
> -	} else if (!fw_update_type) {
> +	else if (!fw_update_type)
>  		firmware_tag = FW_TAG_INT_DEFAULT;
> -	} else {
> +	else
>  		firmware_tag = FW_TAG_BCND_DEFAULT;
> -	}
>  
>  	if (argc > 4)
>  		sscanf(argv[4], "%u", &fw_timeout);

Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>

-- 
viresh
_______________________________________________
greybus-dev mailing list
greybus-dev@xxxxxxxxxxxxxxxx
https://lists.linaro.org/mailman/listinfo/greybus-dev




[Index of Archives]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]     [Asterisk Books]

  Powered by Linux