aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/cstyle.pl
diff options
context:
space:
mode:
authorGiuseppe Di Natale <dinatale2@users.noreply.github.com>2017-01-26 12:40:22 -0800
committerBrian Behlendorf <behlendorf1@llnl.gov>2017-01-26 12:40:22 -0800
commitd96e5439541bce02c44efa56800c022ec9b43aa7 (patch)
tree007069e3499b1e548c194c163686eee2557a84bb /scripts/cstyle.pl
parentd4e004078176e3c48fda891a62fc5dc48ca314c8 (diff)
OpenZFS 7348 - cstyle can't handle ellipsis on continuation line
Authored by: Hans Rosenfeld <hans.rosenfeld@nexenta.com> Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com> Reviewed by: Jason King <jason.brian.king@gmail.com> Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Dan McDonald <danmcd@omniti.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov> OpenZFS-issue: https://www.illumos.org/issues/7348 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/c667d21 Closes #5655
Diffstat (limited to 'scripts/cstyle.pl')
-rwxr-xr-xscripts/cstyle.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/cstyle.pl b/scripts/cstyle.pl
index f8dac9c2d..73c708c0b 100755
--- a/scripts/cstyle.pl
+++ b/scripts/cstyle.pl
@@ -19,6 +19,7 @@
#
# CDDL HEADER END
#
+# Copyright 2016 Nexenta Systems, Inc.
#
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -399,7 +400,7 @@ line: while (<$filehandle>) {
$prev = $line;
next line;
}
- if ($in_function_header && ! /^ ./ ) {
+ if ($in_function_header && ! /^ (\w|\.)/ ) {
if (/^{}$/ # empty functions
|| /;/ #run function with multiline arguments
|| /#/ #preprocessor commands
@@ -507,7 +508,7 @@ line: while (<$filehandle>) {
err("spaces instead of tabs");
}
if (/^ / && !/^ \*[ \t\/]/ && !/^ \*$/ &&
- (!/^ \w/ || $in_function != 0)) {
+ (!/^ (\w|\.)/ || $in_function != 0)) {
err("indent by spaces instead of tabs");
}
if (/^\t+ [^ \t\*]/ || /^\t+ \S/ || /^\t+ \S/) {