[PATCH pushed] virDomainDriverAutoShutdown: Fix printf conversion specifier for 'waitShutdownSecs'

Peter Krempa via Devel posted 1 patch 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/c7078a136ca844183f945bf72640a6871b19bc81.1749450175.git.pkrempa@redhat.com
src/hypervisor/domain_driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH pushed] virDomainDriverAutoShutdown: Fix printf conversion specifier for 'waitShutdownSecs'
Posted by Peter Krempa via Devel 3 months ago
From: Peter Krempa <pkrempa@redhat.com>

The variable is declared as unsigned int but two places used '%d'.

Reported-in: https://issues.redhat.com/browse/RHEL-95721
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---

Trivial.

 src/hypervisor/domain_driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/hypervisor/domain_driver.c b/src/hypervisor/domain_driver.c
index 35966a5a8d..62bbe176ae 100644
--- a/src/hypervisor/domain_driver.c
+++ b/src/hypervisor/domain_driver.c
@@ -880,9 +880,9 @@ virDomainDriverAutoShutdown(virDomainDriverAutoShutdownConfig *cfg)
         }

         timer = g_timer_new();
-        virSystemdNotifyStatus("Waiting %d secs for VM shutdown completion",
+        virSystemdNotifyStatus("Waiting %u secs for VM shutdown completion",
                                cfg->waitShutdownSecs);
-        VIR_INFO("Waiting %d secs for VM shutdown completion", cfg->waitShutdownSecs);
+        VIR_INFO("Waiting %u secs for VM shutdown completion", cfg->waitShutdownSecs);
         while (1) {
             bool anyRunning = false;
             for (i = 0; i < numDomains; i++) {
-- 
2.49.0