summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-10-07 09:11:03 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-10-07 09:13:00 +0200
commitc0fec67e7809899bcde745b4ea3053305933172d (patch)
tree50c09a451d26c4a84be30eb2fd2dd67ce916b8f0
parentec1cb755bf859fae0ae5cb80a577067b8e76947e (diff)
downloadcurl-bagder/checksrc-cpp-col0.tar.gz
checksrc: detect // comments on column 0bagder/checksrc-cpp-col0
Spotted while working on #6045
-rwxr-xr-xlib/checksrc.pl2
1 files changed, 1 insertions, 1 deletions
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");
}