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 <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Dave Reisner 2012-10-15 15:27:42 -04:00 committed by Allan McRae
parent 1c0c292728
commit 8054a254cb

View file

@ -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), "",