diff options
author | Jindrich Novy <jnovy@redhat.com> | 2008-04-16 10:11:37 +0200 |
---|---|---|
committer | Jindrich Novy <jnovy@redhat.com> | 2008-04-16 10:11:37 +0200 |
commit | 36cbcd454eed7a4158f49cfa55e2f817d5e22bd9 (patch) | |
tree | a9280163db6a4b3b1f2a6e64606dea593d8936e5 | |
parent | ce12b9a112ea067d8fb2e3960d95a4468555e33b (diff) | |
download | rpm-36cbcd454eed7a4158f49cfa55e2f817d5e22bd9.tar.gz rpm-36cbcd454eed7a4158f49cfa55e2f817d5e22bd9.tar.bz2 rpm-36cbcd454eed7a4158f49cfa55e2f817d5e22bd9.zip |
Don't try to print buf if it's empty
-rw-r--r-- | lib/query.c | 6 |
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 { |