Re: [PATCH v6 4/6] convert: put the flags field before the flag itself for consistent style

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

 



Lars Schneider <larsxschneider@xxxxxxxxx> writes:

> Suggested-by: Jeff King <peff@xxxxxxxx>
> Signed-off-by: Lars Schneider <larsxschneider@xxxxxxxxx>
> ---
>  convert.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

An obviously correct no-op.

I do not particularly see the first one making any improvement (but
it is not making things any worse, either), but turning (CONST &
var) to (var & CONST) may make it easier to read for some people so
I wouldn't complain.

Will queue.

>
> diff --git a/convert.c b/convert.c
> index f1e168bc30..9907e3b9ba 100644
> --- a/convert.c
> +++ b/convert.c
> @@ -597,12 +597,12 @@ static int apply_multi_file_filter(const char *path, const char *src, size_t len
>  	}
>  	process = &entry->subprocess.process;
>  
> -	if (!(wanted_capability & entry->supported_capabilities))
> +	if (!(entry->supported_capabilities & wanted_capability))
>  		return 0;
>  
> -	if (CAP_CLEAN & wanted_capability)
> +	if (wanted_capability & CAP_CLEAN)
>  		filter_type = "clean";
> -	else if (CAP_SMUDGE & wanted_capability)
> +	else if (wanted_capability & CAP_SMUDGE)
>  		filter_type = "smudge";
>  	else
>  		die("unexpected filter type");
> @@ -703,9 +703,9 @@ static int apply_filter(const char *path, const char *src, size_t len,
>  	if (!dst)
>  		return 1;
>  
> -	if ((CAP_CLEAN & wanted_capability) && !drv->process && drv->clean)
> +	if ((wanted_capability & CAP_CLEAN) && !drv->process && drv->clean)
>  		cmd = drv->clean;
> -	else if ((CAP_SMUDGE & wanted_capability) && !drv->process && drv->smudge)
> +	else if ((wanted_capability & CAP_SMUDGE) && !drv->process && drv->smudge)
>  		cmd = drv->smudge;
>  
>  	if (cmd && *cmd)



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux