Make permsFormat() work with any numeric type

This commit is contained in:
Panu Matilainen 2008-11-17 12:39:13 +02:00
parent 5580fe23d5
commit 53dcad2f9d
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}