From 8054a254cb70229da30d758f57ff6203d2215eed Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 15 Oct 2012 15:27:42 -0400 Subject: pactree: fix style violations Stick to c89 and avoid mixed code and declarations, and always brace block statements, even if they're only 1 line. Signed-off-by: Dave Reisner Signed-off-by: Allan McRae --- src/util/pactree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/util/pactree.c b/src/util/pactree.c index ae0c8a07..1ed40250 100644 --- a/src/util/pactree.c +++ b/src/util/pactree.c @@ -336,15 +336,16 @@ static void print_text(const char *pkg, const char *provision, tdepth *depth, int last) { const char* tip = last ? style->last : style->tip; + int level = 0; if(!pkg && !provision) { /* not much we can do */ return; } /* print limbs */ - while(depth->prev) + while(depth->prev) { depth = depth->prev; - int level = 0; + } printf("%s", color->branch1); while(depth->next){ printf("%*s%-*s", style->indent * (depth->level - level), "", -- cgit v1.2.3-24-g4f1b