summaryrefslogtreecommitdiff
path: root/lib
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 10:14:50 +0200
commit7d8c89d47b459e104125dc900251d0bd07c6fd79 (patch)
tree430ae2a07b400addc023f62454fd6e5b52adcf47 /lib
parentbc5455fa74234370ab4bc7dbb3a5f252e8f2d432 (diff)
downloadcurl-7d8c89d47b459e104125dc900251d0bd07c6fd79.tar.gz
checksrc: detect // comments on column 0
Spotted while working on #6045 Closes #6048
Diffstat (limited to 'lib')
-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");
}