# HG changeset patch # User Matti Hamalainen # Date 1580110806 -7200 # Node ID f07e3e66ca58f5b793224143ae32b6d67544b41b # Parent bb7264ddaefd5541664abd9fd11d9b5a2a410125 Cleanup. diff -r bb7264ddaefd -r f07e3e66ca58 tools/data2inc.c --- a/tools/data2inc.c Tue Jan 21 07:54:54 2020 +0200 +++ b/tools/data2inc.c Mon Jan 27 09:40:06 2020 +0200 @@ -209,17 +209,22 @@ static void dmPrintIndentation(FILE *fh) { + int level; + const char *str; + if (optIndentation < 0) { - for (int i = 0; i < -optIndentation; i++) - fputs("\t", fh); + level = - optIndentation; + str = "\t"; } else - if (optIndentation > 0) { - for (int i = 0; i < optIndentation; i++) - fputs(" ", fh); + level = optIndentation; + str = " "; } + + for (int i = 0; i < level; i++) + fputs(str, fh); }