diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-05-20 11:57:30 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-05-21 12:04:50 +0300 |
commit | fae1edeb939e761a7fd070081d378a2a67a485f9 (patch) | |
tree | f773e7fb88d37ad5c5e31b54af4b0a0fab1cbab1 /lib/rpmtd.c | |
parent | 845eb8fc70493da08e9cf31749796dbb976aa657 (diff) | |
download | librpm-tizen-fae1edeb939e761a7fd070081d378a2a67a485f9.tar.gz librpm-tizen-fae1edeb939e761a7fd070081d378a2a67a485f9.tar.bz2 librpm-tizen-fae1edeb939e761a7fd070081d378a2a67a485f9.zip |
Lose padding argument from formatters
- formatPrefix already contains the padding, just use rasprintf() on that
to get properly allocated buffer without messing with it manually
- xml format doesn't honor padding anyway so don't bother with it
Diffstat (limited to 'lib/rpmtd.c')
-rw-r--r-- | lib/rpmtd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/rpmtd.c b/lib/rpmtd.c index 0d1486304..57fdd5284 100644 --- a/lib/rpmtd.c +++ b/lib/rpmtd.c @@ -6,8 +6,7 @@ #include "debug.h" -typedef char * (*headerTagFormatFunction) - (rpmtd td, char *formatPrefix, size_t padding); +typedef char * (*headerTagFormatFunction) (rpmtd td, char *formatPrefix); extern void *rpmHeaderFormatFuncByValue(rpmtdFormats fmt); @@ -154,7 +153,7 @@ char *rpmtdFormat(rpmtd td, rpmtdFormats fmt, const char *errmsg) if (func) { char fmtbuf[50]; /* yuck, get rid of this */ strcpy(fmtbuf, "%"); - str = func(td, fmtbuf, 0); + str = func(td, fmtbuf); } else { err = _("Unknown format"); } |