summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-07-07 09:45:09 +0300
committerTimo Teras <timo.teras@iki.fi>2009-07-07 09:45:09 +0300
commit812a6a3167be1082e190e7da04c71fece6821e66 (patch)
tree46d58590b4632be9445b996f5aae13f3f57e1091
parentdc5c436c5a5ec183854923ce2fef955e8118564e (diff)
downloadapk-tools-812a6a3167be1082e190e7da04c71fece6821e66.tar.gz
apk-tools-812a6a3167be1082e190e7da04c71fece6821e66.tar.bz2
apk-tools-812a6a3167be1082e190e7da04c71fece6821e66.tar.xz
apk-tools-812a6a3167be1082e190e7da04c71fece6821e66.zip
ver: fix output indentation
-rw-r--r--src/ver.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ver.c b/src/ver.c
index fc3e8d5..9c2c7f7 100644
--- a/src/ver.c
+++ b/src/ver.c
@@ -78,6 +78,7 @@ static void ver_print_package_status(struct apk_package *pkg)
{
struct apk_name *name;
struct apk_package *latest, *tmp;
+ char pkgname[256];
int i, r;
name = pkg->name;
@@ -92,7 +93,8 @@ static void ver_print_package_status(struct apk_package *pkg)
latest = tmp;
}
r = apk_pkg_version_compare(pkg, latest);
- printf("%s-%-40s%s %s\n", name->name, pkg->version, apk_version_op_string(r), latest->version);
+ snprintf(pkgname, sizeof(pkgname), "%s-%s", name->name, pkg->version);
+ printf("%-40s%s %s\n", pkgname, apk_version_op_string(r), latest->version);
}
static int ver_main(void *ctx, int argc, char **argv)