From 36cbcd454eed7a4158f49cfa55e2f817d5e22bd9 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Wed, 16 Apr 2008 10:11:37 +0200 Subject: Don't try to print buf if it's empty --- lib/query.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/query.c b/lib/query.c index bd91b4fdb..bc5f6990a 100644 --- a/lib/query.c +++ b/lib/query.c @@ -231,7 +231,7 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h) free(add); } else if (!rpmIsVerbose()) { - rpmlog(RPMLOG_NOTICE, "%s%s\n", buf, fn); + rpmlog(RPMLOG_NOTICE, "%s%s\n", buf ? buf : "", fn); } else { @@ -242,7 +242,9 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h) } if (fuser && fgroup) { - rpmlog(RPMLOG_NOTICE, "%s", buf); + if (buf) { + rpmlog(RPMLOG_NOTICE, "%s", buf); + } printFileInfo(fn, fsize, fmode, fmtime, frdev, fnlink, fuser, fgroup, flink); } else { -- cgit v1.2.3