diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-09-05 13:43:09 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-09-05 13:43:09 +0300 |
commit | c30b41cfe9475860db231c2a03fe2becaf90c4b2 (patch) | |
tree | fe3b1e7c3e7dda498c78c9de63fe46be6f9e0e63 /rpmdb/header.c | |
parent | 1a2426fec6419856211d745ba167cea53befacfd (diff) | |
download | librpm-tizen-c30b41cfe9475860db231c2a03fe2becaf90c4b2.tar.gz librpm-tizen-c30b41cfe9475860db231c2a03fe2becaf90c4b2.tar.bz2 librpm-tizen-c30b41cfe9475860db231c2a03fe2becaf90c4b2.zip |
Make formatValue() use the bin2hex helper.
Diffstat (limited to 'rpmdb/header.c')
-rw-r--r-- | rpmdb/header.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/rpmdb/header.c b/rpmdb/header.c index 7eed56016..97e7d0245 100644 --- a/rpmdb/header.c +++ b/rpmdb/header.c @@ -3163,25 +3163,8 @@ static char * formatValue(headerSprintfArgs hsa, sprintfTag tag, int element) if (val) { need = strlen(val); } else { -#ifdef NOTYET - val = memcpy(xmalloc(count), data, count); -#else - /* XXX format string not used */ - static char hex[] = "0123456789abcdef"; - const char * s = data; - -/*@-boundswrite@*/ - need = 2*count + tag->pad; - val = t = xmalloc(need+1); - while (count-- > 0) { - unsigned int i; - i = *s++; - *t++ = hex[ (i >> 4) & 0xf ]; - *t++ = hex[ (i ) & 0xf ]; - } - *t = '\0'; -/*@=boundswrite@*/ -#endif + val = bin2hex(data, count); + need = strlen(val) + tag->pad; } break; |