Re: [PATCH] debug: assure NULLSTR() around all %s args in debug at top of public APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 27, 2015 at 02:02:53PM -0400, Laine Stump wrote:
There are also a couple that were very uninformatively just logging
the value of the pointer rather than the string itself:

* the "name" arg to virNodeDeviceLookupByName()
* wwnn and wwpn args to virNodeDeviceLookupSCSIHostByWWN()

All char*'s that make sense should now have their contents logged
rather than the pointer, and all %s args should now be inside
NULLSTR().
---
src/libvirt-domain.c    | 36 ++++++++++++++++++------------------
src/libvirt-host.c      |  6 +++---
src/libvirt-interface.c |  6 +++---
src/libvirt-network.c   |  6 +++---
src/libvirt-nodedev.c   | 10 +++++-----
src/libvirt-nwfilter.c  |  6 +++---
src/libvirt-secret.c    |  4 ++--
src/libvirt-storage.c   | 16 ++++++++--------
8 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 2edba1a..5907f58 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -4817,7 +4817,7 @@ virDomainMigratePrepare3(virConnectPtr dconn,
    VIR_DEBUG("dconn=%p, cookiein=%p, cookieinlen=%d, cookieout=%p, "
              "cookieoutlen=%p, uri_in=%s, uri_out=%p, flags=%lx, dname=%s, "
              "bandwidth=%lu, dom_xml=%s",
-              dconn, cookiein, cookieinlen, cookieout, cookieoutlen, uri_in,
+              dconn, cookiein, cookieinlen, cookieout, cookieoutlen, NULLSTR(uri_in),
              uri_out, flags, NULLSTR(dname), bandwidth, dom_xml);

You missed dom_xml here.

ACK with that fixed.  I think this is safe for freeze, too.

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]