[dm-devel] [PATCH] multipath-tools: Remove trailing/leading whitespaces and reformat code

Bart Van Assche Bart.VanAssche at wdc.com
Fri Mar 9 22:04:08 UTC 2018


On Fri, 2018-03-09 at 23:00 +0100, Xose Vazquez Perez wrote:
>  # Check whether a function with name $1 has been declared in header file $2.
> -check_func =								       \
> -    $(shell								       \
> +check_func = $(shell \
>  	if grep -Eq "^[^[:blank:]]+[[:blank:]]+$1[[:blank:]]*(.*)*" "$2"; then \
> -	   found=1;							       \
> -	   status="yes";						       \
> -	else								       \
> -	   found=0;							       \
> -	   status="no";							       \
> -	fi;								       \
> -	echo 1>&2 "Checking for $1 in $2 ... $$status";			       \
> -	echo "$$found"							       \
> -    )
> +		found=1; \
> +		status="yes"; \
> +	else \
> +		found=0; \
> +		status="no"; \
> +	fi; \
> +	echo 1>&2 "Checking for $1 in $2 ... $$status"; \
> +	echo "$$found" \
> +	)

Whitespace-only patches are not useful, and on top of that you are making the code
much more ugly by breaking the alignment of the trailing backslahes. Yikes!

Bart.






More information about the dm-devel mailing list