checkpatch: return is not a function -- parentheses for casts are ok too

Casts require parentheses so it is possible to have something like this:

	return (int)(*a);

This miss trips the complexity function.  Ensure that the two separate
parenthesised sections are not coelesced.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Andy Whitcroft 2008-07-23 21:28:56 -07:00 committed by Linus Torvalds
parent 6cbb2e7111
commit fee61c47d1
1 changed files with 1 additions and 0 deletions

View File

@ -1670,6 +1670,7 @@ sub process {
my $value = $2;
# Flatten any parentheses and braces
$value =~ s/\)\(/\) \(/g;
while ($value =~ s/\([^\(\)]*\)/1/) {
}