X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=extras%2Fcheckpatch.pl;h=fdd84849badbcd77f8536ad327a9c32f1a6ee7fd;hp=7b2d29b0b6695a648fefe40b71fd8c5c267f3bc0;hb=7335fad67f8c47c2339b82e0dcbf36b28dc1e6a8;hpb=7a6dd8dde9ea347b5dedd7a712921ca1af1eba50;ds=sidebyside diff --git a/extras/checkpatch.pl b/extras/checkpatch.pl index 7b2d29b0b..fdd84849b 100755 --- a/extras/checkpatch.pl +++ b/extras/checkpatch.pl @@ -500,7 +500,7 @@ sub expand_tabs { if ($c eq "\t") { $res .= ' '; $n++; - for (; ($n % 8) != 0; $n++) { + for (; ($n % 4) != 0; $n++) { $res .= ' '; } next; @@ -1860,8 +1860,8 @@ sub process { my $newindent = $2; my $goodtabindent = $oldindent . - "\t" x ($pos / 8) . - " " x ($pos % 8); + "\t" x ($pos / 4) . + " " x ($pos % 4); my $goodspaceindent = $oldindent . " " x $pos; if ($newindent ne $goodtabindent && @@ -2164,7 +2164,7 @@ sub process { #print "line<$line> prevline<$prevline> indent<$indent> sindent<$sindent> check<$check> continuation<$continuation> s<$s> cond_lines<$cond_lines> stat_real<$stat_real> stat<$stat>\n"; - if ($check && (($sindent % 8) != 0 || + if ($check && (($sindent % 4) != 0 || ($sindent <= $indent && $s ne ''))) { WARN("SUSPECT_CODE_INDENT", "suspect code indent for conditional statements ($indent, $sindent)\n" . $herecurr . "$stat_real\n");