diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-10-15 21:27:42 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2012-11-27 06:16:15 +0100 |
commit | 8054a254cb70229da30d758f57ff6203d2215eed (patch) | |
tree | 13af48943547bc0b0f845a58c6abe4741827f035 | |
parent | 1c0c292728c6bb5987b418c7ecbaf998a26c066d (diff) | |
download | pacman-8054a254cb70229da30d758f57ff6203d2215eed.tar.gz pacman-8054a254cb70229da30d758f57ff6203d2215eed.tar.xz |
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>
-rw-r--r-- | src/util/pactree.c | 5 |
1 files changed, 3 insertions, 2 deletions
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), "", |