summaryrefslogtreecommitdiff
path: root/lib/formats.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-11-17 12:34:22 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-11-17 12:34:22 +0200
commitf31b790c31d017b9fbe75d1af822c8b438c0cd84 (patch)
treeb044886c44927e22691f45137439be0a6f8dc763 /lib/formats.c
parent2b3380aa3455cd6aa3a86491c33c15648360f6fd (diff)
downloadlibrpm-tizen-f31b790c31d017b9fbe75d1af822c8b438c0cd84.tar.gz
librpm-tizen-f31b790c31d017b9fbe75d1af822c8b438c0cd84.tar.bz2
librpm-tizen-f31b790c31d017b9fbe75d1af822c8b438c0cd84.zip
Make shescapeFormat() to accept any numeric type
Diffstat (limited to 'lib/formats.c')
-rw-r--r--lib/formats.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/formats.c b/lib/formats.c
index 72c6a98a4..bceb019c0 100644
--- a/lib/formats.c
+++ b/lib/formats.c
@@ -163,9 +163,9 @@ static char * shescapeFormat(rpmtd td, char * formatPrefix)
{
char * result = NULL, * dst, * src;
- if (rpmtdType(td) == RPM_INT32_TYPE) {
- strcat(formatPrefix, "d");
- rasprintf(&result, formatPrefix, *rpmtdGetUint32(td));
+ if (rpmtdClass(td) == RPM_NUMERIC_CLASS) {
+ strcat(formatPrefix, PRIu64);
+ rasprintf(&result, formatPrefix, rpmtdGetNumber(td));
} else {
char *buf = NULL;
strcat(formatPrefix, "s");