diff options
author | [email protected] <[email protected]> | 2010-11-30 13:51:13 -0800 |
---|---|---|
committer | Michal Marek <[email protected]> | 2010-12-14 17:02:45 +0100 |
commit | de323f22a83b024b7432e813609c6efb74b1bbfc (patch) | |
tree | 69e8528d4b5446f1300885f54821e93dc349aa98 | |
parent | a1087ef6abedf0bfd60e5e3fddf33192cb2c1325 (diff) |
headers_check: better search for functions in headers
Some headers don't bother with "extern" in function prototypes, which
results in said prototypes being unnoticed and exported to userland.
This patch slightly improves detection of such cases by checking for C
type names as well in the beginning of a line.
Signed-off-by: Alexander Shishkin <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Michal Marek <[email protected]>
Cc: WANG Cong <[email protected]>
Cc: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
-rw-r--r-- | scripts/headers_check.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl index 50d6cfd1fa77..e0e25a1c2c12 100644 --- a/scripts/headers_check.pl +++ b/scripts/headers_check.pl @@ -64,7 +64,7 @@ sub check_include sub check_declarations { - if ($line =~m/^\s*extern\b/) { + if ($line =~m/^(\s*extern|unsigned|char|short|int|long|void)\b/) { printf STDERR "$filename:$lineno: " . "userspace cannot call function or variable " . "defined in the kernel\n"; |