Re: [PATCH 12/20] alias: trivial style fix

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

 



Jonathan Nieder wrote:
> Stefan Beller wrote:
> > On 10/12/2013 09:07 AM, Felipe Contreras wrote:
> 
> >> Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
> >
> > Not sure if it's worth by a newcomer. ;)
> 
> A second set of eyes is always welcome.
> 
> My thoughts: I have to admit I don't see much value in mechanical
> replacements like this one when done piecemeal and without other more
> significant changes on top.

A code-style fix is a code-style fix. If you don't send and apply code-style
fixes, your code would remain forever inconsistent, and not following the
style.

It's interesting how the most successfull project in history has a different
take on this:

http://article.gmane.org/gmane.linux.acpi.devel/42407

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=915ea7e41439efa7793814cdf4338cb6b003538a
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=21fcb34e28e99291e91d83422f2824f11b3c9ce9
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=28ee793e7ad4a00e41c6267075501694c94451fb

> >> --- a/alias.c
> >> +++ b/alias.c
> >> @@ -5,7 +5,7 @@ static char *alias_val;
> >>  
> >>  static int alias_lookup_cb(const char *k, const char *v, void *cb)
> >>  {
> >> -	if (!prefixcmp(k, "alias.") && !strcmp(k+6, alias_key)) {
> >> +	if (!prefixcmp(k, "alias.") && !strcmp(k + 6, alias_key)) {
> 
> does not look worth the churn and mailing list noise to me.
> 
> A patch that globally took care of these var+constant constructs
> without surrounding space and did nothing else, once and for all to
> avoid later noise, may or may not be useful.  I suspect even that
> wouldn't be worth it, since "k+6" already seems perfectly readable.

This comes from the Linux kernel code-style:

----
Use one space around (on each side of) most binary and ternary operators,
such as any of these:

	=  +  -  <  >  *  /  %  |  &  ^  <=  >=  ==  !=  ?  :
----

So no, to me and a huge lot of developers it's not "perfectly readable".

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




[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]