Signed-off-by: Wenchao Xia <xiawenc(a)linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan(a)redhat.com>
Reviewed-by: Sharad Mishra <snmishra(a)us.ibm.com>
---
src/Virt_ComputerSystemIndication.c | 2 +-
src/Virt_DevicePool.c | 2 +-
src/Virt_ResourceAllocationSettingDataIndication.c | 6 +++++-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/Virt_ComputerSystemIndication.c b/src/Virt_ComputerSystemIndication.c
index 3096683..8250850 100644
--- a/src/Virt_ComputerSystemIndication.c
+++ b/src/Virt_ComputerSystemIndication.c
@@ -504,7 +504,7 @@ static void csi_domain_event_cb(virConnectPtr conn,
CMPIStatus s = {CMPI_RC_OK, NULL};
if (lifecycle_enabled == false || thread->active_filters <= 0) {
- CU_DEBUG("%s indications deactivated, return");
+ CU_DEBUG("%s indications deactivated, return", prefix);
return;
}
diff --git a/src/Virt_DevicePool.c b/src/Virt_DevicePool.c
index 56c9715..08677e2 100644
--- a/src/Virt_DevicePool.c
+++ b/src/Virt_DevicePool.c
@@ -710,7 +710,7 @@ static bool mempool_set_consumed(CMPIInstance *inst, virConnectPtr
conn)
dom = virDomainLookupByID(conn, domain_ids[i]);
if (dom == NULL) {
- CU_DEBUG("Cannot connect to domain %n: excluding",
+ CU_DEBUG("Cannot connect to domain %d: excluding",
domain_ids[i]);
continue;
}
diff --git a/src/Virt_ResourceAllocationSettingDataIndication.c
b/src/Virt_ResourceAllocationSettingDataIndication.c
index a386132..93fb563 100644
--- a/src/Virt_ResourceAllocationSettingDataIndication.c
+++ b/src/Virt_ResourceAllocationSettingDataIndication.c
@@ -122,7 +122,11 @@ static CMPIStatus raise_indication(const CMPIBroker *broker,
if (s.rc == CMPI_RC_OK) {
CU_DEBUG("Indication delivered");
} else {
- CU_DEBUG("Not delivered: %s", CMGetCharPtr(s.msg));
+ if (s.msg == NULL) {
+ CU_DEBUG("Not delivered: msg is NULL.");
+ } else {
+ CU_DEBUG("Not delivered: %s", CMGetCharPtr(s.msg));
+ }
}
out:
--
1.7.1