Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164529
b: refs/heads/master
c: 113f04a
h: refs/heads/master
i:
  164527: dccd786
v: v3
  • Loading branch information
Daniel Walker authored and Linus Torvalds committed Sep 22, 2009
1 parent 7bf73dc commit d8f3792
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 463f28648586721c2191130c9b3c27589dcc11a0
refs/heads/master: 113f04a836481e9ecc26e8dee8b0e4d52878a288
13 changes: 13 additions & 0 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,13 @@ sub sanitise_line {
$off++;
next;
}
if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') {
$sanitise_quote = '//';

substr($res, $off, 2, $sanitise_quote);
$off++;
next;
}

# A \ in a string means ignore the next character.
if (($sanitise_quote eq "'" || $sanitise_quote eq '"') &&
Expand All @@ -379,13 +386,19 @@ sub sanitise_line {
#print "c<$c> SQ<$sanitise_quote>\n";
if ($off != 0 && $sanitise_quote eq '*/' && $c ne "\t") {
substr($res, $off, 1, $;);
} elsif ($off != 0 && $sanitise_quote eq '//' && $c ne "\t") {
substr($res, $off, 1, $;);
} elsif ($off != 0 && $sanitise_quote && $c ne "\t") {
substr($res, $off, 1, 'X');
} else {
substr($res, $off, 1, $c);
}
}

if ($sanitise_quote eq '//') {
$sanitise_quote = '';
}

# The pathname on a #include may be surrounded by '<' and '>'.
if ($res =~ /^.\s*\#\s*include\s+\<(.*)\>/) {
my $clean = 'X' x length($1);
Expand Down

0 comments on commit d8f3792

Please sign in to comment.