From 0662b2f5127df7c07e379c117085236f90f49b42 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Wed, 16 Apr 2008 11:16:31 +0200 Subject: Kill queryHeader(), it is not used and buggy --- lib/query.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'lib/query.c') 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); } } -- cgit v1.2.3