summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-10-15 15:27:42 -0400
committerAllan McRae <allan@archlinux.org>2012-11-27 15:16:15 +1000
commit8054a254cb70229da30d758f57ff6203d2215eed (patch)
tree13af48943547bc0b0f845a58c6abe4741827f035 /src
parent1c0c292728c6bb5987b418c7ecbaf998a26c066d (diff)
downloadpacman-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>
Diffstat (limited to 'src')
-rw-r--r--src/util/pactree.c5
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), "",