Re: [PATCH] coccinelle: misc: move constants to the right

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

 



On Fri, 2015-09-04 at 17:55 +0200, Julia Lawall wrote:
> Move constants to the right in binary operators.

Thanks Julia.

I think this should be sent to lkml.

Does this manage to not move upper case identifiers
that aren't constants?

{
	int E = foo();

	if (E < bar())
		baz();
}

> diff --git a/var/julia/linuxcopy/scripts/coccinelle/misc/compare_const_fl.cocci b/var/julia/linuxcopy/scripts/coccinelle/misc/compare_const_fl.cocci
[]
> +++ b/scripts/coccinelle/misc/compare_const_fl.cocci
> @@ -0,0 +1,171 @@
> +/// Move constants to the right of binary operators.
> +//# Depends on personal taste in some cases.
> +///
> +// Confidence: Moderate

If not, maybe some of the cases that don't work
well should be noted in the commit message and
perhaps here in the code comments as well.


--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux