lkml.org 
[lkml]   [2013]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPreferred line-break style around binary operators?
There are two common approaches to breaking long lines at binary
operators: breaking the line before the operator (putting the operator
at the start of the next line), or breaking the line after the operator
(putting the operator at the end of the previous line).

CodingStyle doesn't define any requirement here, and the kernel uses
both approaches; for instance, using && as a sample:

$ git grep -h '&&$' | wc -l
28872
$ git grep -h '^[[:space:]]*&&' | wc -l
4169

Which style should kernel code use? I can submit a CodingStyle patch
documenting that preference for future reference.

- Josh Triplett


\
 
 \ /
  Last update: 2013-10-07 00:01    [W:0.070 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site