diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-05-20 12:07:38 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-05-21 12:04:51 +0300 |
commit | fc38b84c010fa8c4f2617b1351ceaccec9f5da60 (patch) | |
tree | 8882554113bd70b732707db47481107a8fb21109 /lib/rpmtd.c | |
parent | fae1edeb939e761a7fd070081d378a2a67a485f9 (diff) | |
download | librpm-tizen-fc38b84c010fa8c4f2617b1351ceaccec9f5da60.tar.gz librpm-tizen-fc38b84c010fa8c4f2617b1351ceaccec9f5da60.tar.bz2 librpm-tizen-fc38b84c010fa8c4f2617b1351ceaccec9f5da60.zip |
Lose the useless rpmtdToString()
- either use rpmtdFormat() or xstrdup() on rpmtdGetString() as appropriate
Diffstat (limited to 'lib/rpmtd.c')
-rw-r--r-- | lib/rpmtd.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/rpmtd.c b/lib/rpmtd.c index 57fdd5284..6f411a4c1 100644 --- a/lib/rpmtd.c +++ b/lib/rpmtd.c @@ -165,43 +165,6 @@ char *rpmtdFormat(rpmtd td, rpmtdFormats fmt, const char *errmsg) return str; } -char *rpmtdToString(rpmtd td) -{ - char *res = NULL; - - switch (td->type) { - case RPM_STRING_TYPE: - case RPM_I18NSTRING_TYPE: - case RPM_STRING_ARRAY_TYPE: { - const char *s = rpmtdGetString(td); - if (s) { - res = xstrdup(s); - } - break; - } - case RPM_INT16_TYPE: { - uint16_t *num = rpmtdGetUint16(td); - if (num) { - rasprintf(&res, "%hd", *num); - } - break; - } - case RPM_INT32_TYPE: { - uint32_t *num = rpmtdGetUint32(td); - if (num) { - rasprintf(&res, "%d", *num); - } - break; - } - case RPM_BIN_TYPE: { - /* XXX TODO: convert to hex presentation */ - } - default: - break; - } - return res; -} - int rpmtdFromArgv(rpmtd td, rpmTag tag, ARGV_t argv) { int count = argvCount(argv); |