diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-11-17 12:42:53 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-11-17 12:42:53 +0200 |
commit | 05a3d00162fe343002e378e42f6458139093ba52 (patch) | |
tree | 4e22f36bc9e3de6f710c62879201863457351acf /lib/formats.c | |
parent | 8ef09ba46c4698ac5a00b496c9ab4a9596bfa31e (diff) | |
download | rpm-05a3d00162fe343002e378e42f6458139093ba52.tar.gz rpm-05a3d00162fe343002e378e42f6458139093ba52.tar.bz2 rpm-05a3d00162fe343002e378e42f6458139093ba52.zip |
Simplify xmlFormat() by taking advantage of rpmtdClass()
Diffstat (limited to 'lib/formats.c')
-rw-r--r-- | lib/formats.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/formats.c b/lib/formats.c index 6eb648400..4b93b0600 100644 --- a/lib/formats.c +++ b/lib/formats.c @@ -372,21 +372,15 @@ static char * xmlFormat(rpmtd td, char * formatPrefix) char *s = NULL; rpmtdFormats fmt = RPMTD_FORMAT_STRING; - switch (rpmtdType(td)) { - case RPM_I18NSTRING_TYPE: - case RPM_STRING_TYPE: - case RPM_STRING_ARRAY_TYPE: + switch (rpmtdClass(td)) { + case RPM_STRING_CLASS: xtag = "string"; break; - case RPM_BIN_TYPE: + case RPM_BINARY_CLASS: fmt = RPMTD_FORMAT_BASE64; xtag = "base64"; break; - case RPM_CHAR_TYPE: - case RPM_INT8_TYPE: - case RPM_INT16_TYPE: - case RPM_INT32_TYPE: - case RPM_INT64_TYPE: + case RPM_NUMERIC_CLASS: xtag = "integer"; break; case RPM_NULL_TYPE: |