Re: if/else coding style :-)

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

 



----- Original Message ----- 

> +1 to existing Linux kernel style. Moreover, its a style which is used
> heavily in existing code base. I don't see any advantage in changing the
> style now.

It's not a change. It's already common in our code, if not actually the *most* common style. 

% find . -name '*.c' | xargs grep '} else {' | wc -l 
1284 
jeff@odroid3 ~/glusterfs (nsr-design) 
% find . -name '*.c' | xargs grep 'else {' | wc -l 
1431 

I haven't checked whether *all* instances of the latter follow a line with a closing brace, but I would bet that the vast majority do because "braces around all if/else blocks" has also been part of our coding style since forever.  Again: checkpatch.pl was *already* rejecting a valid and common form when it was first introduced.  If people want to fix places where they feel that's still happening, I strongly suggest submitting patches against checkpatch.pl and we can discuss them there.

_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://supercolony.gluster.org/mailman/listinfo/gluster-devel




[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux