From bc5eef939f22094b4b00d07ba1056451300d723b Mon Sep 17 00:00:00 2001 From: "David A. Wheeler" Date: Tue, 29 Jul 2014 08:23:24 -0400 Subject: [PATCH] flawfinder: Replace tabs with spaces, making indentation char consistent --- flawfinder | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/flawfinder b/flawfinder index f28437c..922b310 100755 --- a/flawfinder +++ b/flawfinder @@ -1399,23 +1399,23 @@ def process_c_file(f, patch_infos): if (word in c_ruleset) and c_valid_match(text, endpos): if ((patch_infos == None) or ((patch_infos != None) and (linenumber in patch_infos[f]))): - # FOUND A MATCH, setup & call hook. - # print "HIT: #%s#\n" % word - # Don't use the tuple assignment form, e.g., a,b=c,d - # because Python (least 2.2.2) does that slower - # (presumably because it creates & destroys temporary tuples) - hit = Hit(c_ruleset[word]) - hit.name = word - hit.start = startpos - hit.end = endpos - hit.line = linenumber - hit.column = find_column(text, startpos) - hit.filename=filename - hit.context_text = get_context(text, startpos) - hit.parameters = extract_c_parameters(text, endpos) - if hit.extract_lookahead: - hit.lookahead = text[startpos:startpos+max_lookahead] - apply(hit.hook, (hit, )) + # FOUND A MATCH, setup & call hook. + # print "HIT: #%s#\n" % word + # Don't use the tuple assignment form, e.g., a,b=c,d + # because Python (least 2.2.2) does that slower + # (presumably because it creates & destroys temporary tuples) + hit = Hit(c_ruleset[word]) + hit.name = word + hit.start = startpos + hit.end = endpos + hit.line = linenumber + hit.column = find_column(text, startpos) + hit.filename=filename + hit.context_text = get_context(text, startpos) + hit.parameters = extract_c_parameters(text, endpos) + if hit.extract_lookahead: + hit.lookahead = text[startpos:startpos+max_lookahead] + apply(hit.hook, (hit, )) elif p_digits.match(c): while i