summaryrefslogtreecommitdiff
path: root/sound/core/oss
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-08-07 03:10:29 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-07 05:01:27 +0400
commit032a4c0f9a77ce565355c6e191553e853ba66f09 (patch)
tree472cf85c05fdcafe028e5b8140729327afcffeea /sound/core/oss
parentebfdc40969f24fc0cdd1349835d36e8ebae05374 (diff)
downloadlinux-032a4c0f9a77ce565355c6e191553e853ba66f09.tar.xz
checkpatch: warn on unnecessary else after return or break
Using an else following a break or return can unnecessarily indent code blocks. ie: for (i = 0; i < 100; i++) { int foo = bar(); if (foo < 1) break; else usleep(1); } is generally better written as: for (i = 0; i < 100; i++) { int foo = bar(); if (foo < 1) break; usleep(1); } Warn when a bare else statement is preceded by a break or return indented 1 tab more than the else. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound/core/oss')
0 files changed, 0 insertions, 0 deletions