diff --git a/lib/checksrc.pl b/lib/checksrc.pl index f9d076a2f..78b9cef5b 100755 --- a/lib/checksrc.pl +++ b/lib/checksrc.pl @@ -442,7 +442,7 @@ sub scanfile { # crude attempt to detect // comments without too many false # positives - if($l =~ /^([^"\*]*)[^:"]\/\//) { + if($l =~ /^(([^"\*]*)[^:"]|)\/\//) { checkwarn("CPPCOMMENTS", $line, length($1), $file, $l, "\/\/ comment"); }