summaryrefslogtreecommitdiff
path: root/lib/formats.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-11-17 12:39:13 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-11-17 12:39:13 +0200
commit53dcad2f9d5e13e246775c3b052c025406100a0d (patch)
tree8d8b93d0f53de607aa386cc329afe762f78ef2f1 /lib/formats.c
parent5580fe23d50b82971c3f0fb12bc613ac64fcdfb0 (diff)
downloadrpm-53dcad2f9d5e13e246775c3b052c025406100a0d.tar.gz
rpm-53dcad2f9d5e13e246775c3b052c025406100a0d.tar.bz2
rpm-53dcad2f9d5e13e246775c3b052c025406100a0d.zip
Make permsFormat() work with any numeric type
Diffstat (limited to 'lib/formats.c')
-rw-r--r--lib/formats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/formats.c b/lib/formats.c
index 7befaa112..5cf0c81dd 100644
--- a/lib/formats.c
+++ b/lib/formats.c
@@ -231,11 +231,11 @@ static char * permsFormat(rpmtd td, char * formatPrefix)
char * val = NULL;
char * buf;
- if (rpmtdType(td) != RPM_INT32_TYPE) {
+ if (rpmtdClass(td) != RPM_NUMERIC_CLASS) {
val = xstrdup(_("(not a number)"));
} else {
strcat(formatPrefix, "s");
- buf = rpmPermsString(*rpmtdGetUint32(td));
+ buf = rpmPermsString(rpmtdGetNumber(td));
rasprintf(&val, formatPrefix, buf);
buf = _free(buf);
}