Git fork

pickaxe/style: consolidate declarations and assignments

Refactor contains() to do its assignments at the same time that it
does its declarations.

This code could have been refactored in ef90ab66e8e (pickaxe: use
textconv for -S counting, 2012-10-28) when a function call between the
declarations and assignments was removed.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Ævar Arnfjörð Bjarmason and committed by
Junio C Hamano
102fdd2e a47fcbe6

+3 -7
+3 -7
diffcore-pickaxe.c
··· 70 70 71 71 static unsigned int contains(mmfile_t *mf, regex_t *regexp, kwset_t kws) 72 72 { 73 - unsigned int cnt; 74 - unsigned long sz; 75 - const char *data; 76 - 77 - sz = mf->size; 78 - data = mf->ptr; 79 - cnt = 0; 73 + unsigned int cnt = 0; 74 + unsigned long sz = mf->size; 75 + const char *data = mf->ptr; 80 76 81 77 if (regexp) { 82 78 regmatch_t regmatch;