Make fflagsFormat() accept any numeric type
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 17 Nov 2008 10:41:24 +0000 (12:41 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 17 Nov 2008 10:41:24 +0000 (12:41 +0200)
lib/formats.c

index 5cf0c81..6eb6484 100644 (file)
@@ -254,11 +254,10 @@ static char * fflagsFormat(rpmtd td, char * formatPrefix)
     char * val = NULL;
     char buf[15];
 
-    if (rpmtdType(td) != RPM_INT32_TYPE) {
+    if (rpmtdClass(td) != RPM_NUMERIC_CLASS) {
        val = xstrdup(_("(not a number)"));
     } else {
-       rpm_flag_t *rf = rpmtdGetUint32(td);
-       rpmfileAttrs anint = *rf;
+       uint64_t anint = rpmtdGetNumber(td);
        buf[0] = '\0';
        if (anint & RPMFILE_DOC)
            strcat(buf, "d");