summaryrefslogtreecommitdiff
path: root/lib/query.c
diff options
context:
space:
mode:
authorJindrich Novy <jnovy@redhat.com>2008-04-16 11:16:31 +0200
committerJindrich Novy <jnovy@redhat.com>2008-04-16 11:18:00 +0200
commit0662b2f5127df7c07e379c117085236f90f49b42 (patch)
tree8a03d19b10e6273a8a118b8a46d310e6d59202cf /lib/query.c
parent004c0e50b42ba10141f20eb3bf2756fd70282f2c (diff)
downloadlibrpm-tizen-0662b2f5127df7c07e379c117085236f90f49b42.tar.gz
librpm-tizen-0662b2f5127df7c07e379c117085236f90f49b42.tar.bz2
librpm-tizen-0662b2f5127df7c07e379c117085236f90f49b42.zip
Kill queryHeader(), it is not used and buggy
Diffstat (limited to 'lib/query.c')
-rw-r--r--lib/query.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/lib/query.c b/lib/query.c
index f91eac0ad..d642c80a6 100644
--- a/lib/query.c
+++ b/lib/query.c
@@ -102,19 +102,6 @@ static void printFileInfo(const char * name,
perms = _free(perms);
}
-/**
- */
-static inline char * queryHeader(Header h, const char * qfmt)
-{
- const char * errstr;
- char * str;
-
- str = headerSprintf(h, qfmt, rpmTagTable, rpmHeaderFormats, &errstr);
- if (str == NULL)
- rpmlog(RPMLOG_ERR, _("incorrect format: %s\n"), errstr);
- return str;
-}
-
int showQueryPackage(QVA_t qva, rpmts ts, Header h)
{
int scareMem = 0;
@@ -123,10 +110,14 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
int i;
if (qva->qva_queryFormat != NULL) {
- char * str = queryHeader(h, qva->qva_queryFormat);
- if (str) {
+ const char *errstr;
+ char *str = headerSprintf(h, qva->qva_queryFormat, rpmTagTable, rpmHeaderFormats, &errstr);
+
+ if ( str != NULL ) {
rpmlog(RPMLOG_NOTICE, "%s", str);
free(str);
+ } else {
+ rpmlog(RPMLOG_ERR, _("incorrect format: %s\n"), errstr);
}
}