summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJindrich Novy <jnovy@redhat.com>2008-04-16 10:11:37 +0200
committerJindrich Novy <jnovy@redhat.com>2008-04-16 10:11:37 +0200
commit36cbcd454eed7a4158f49cfa55e2f817d5e22bd9 (patch)
treea9280163db6a4b3b1f2a6e64606dea593d8936e5 /lib
parentce12b9a112ea067d8fb2e3960d95a4468555e33b (diff)
downloadrpm-36cbcd454eed7a4158f49cfa55e2f817d5e22bd9.tar.gz
rpm-36cbcd454eed7a4158f49cfa55e2f817d5e22bd9.tar.bz2
rpm-36cbcd454eed7a4158f49cfa55e2f817d5e22bd9.zip
Don't try to print buf if it's empty
Diffstat (limited to 'lib')
-rw-r--r--lib/query.c6
1 files changed, 4 insertions, 2 deletions
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 {