libvirt/virrandom-Fix-printf-format-string-in-virRandomGener.patch
Jiabo Feng 52e9a4d1d4 libvirt update to version 6.2.0-60
- vdpa: support vdpa device migrate
- vdpa: support vdpa device hot plug/unplug
- vdpa: Introduce the new device type vdpa to hostdev
- node_device: fix leak of DIR*
- Include vdpa devices in node device list
- lxc: fix lxcContainerMountAllFS() DEREF_BEFORE_CHECK
- qemu: Return perf status that affect next boot  for shutoff domains While we set up perf events for a shutoff domain and check the settings, All of perf events are reported as 'disabled', unless we add --config, This is redundant for a shutoff domain.
- tests: upstream Fixing compiler warning in cputest
- qemu_migration_cookie: Rename ret in qemuDomainExtractTLSSubject
- virrandom: Fix printf format string in virRandomGenerateWWN()
- fix the issue of errors when saving after 'virsh edit'
- Use (un)signed printf specifiers correctly
- admin: fix leak of typed parameters on error
- esx: call freeaddrinfo earlier in esxUtil_ResolveHostname Call freeaddrinfo() as soon as @result is not needed anymore, i.e. right after getnameinfo(); this avoids calling freeaddrinfo() in two branches.
- qemu: Fix incorrect command name in error messages

Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
2023-12-05 21:06:20 +08:00

34 lines
1.1 KiB
Diff

From 4fa96d435fb3a60b4757b41b1d9f273225c79158 Mon Sep 17 00:00:00 2001
From: zhujun2 <zhujun2@cmss.chinamobile.com>
Date: Mon, 31 Jul 2023 20:08:11 -0700
Subject: [PATCH] virrandom: Fix printf format string in virRandomGenerateWWN()
Firstly, drop needless concatenation of two static strings.
Secondly, use proper (portable) formatter for uint64_t so that
typecast to ULL can be dropped.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: zhujun2 <zhujun2_yewu@cmss.chinamobile.com>
(cherry-pick form b857ad0696ca5177eccf482f244665c246b3ace8)
---
src/util/virrandom.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/util/virrandom.c b/src/util/virrandom.c
index 0487b4e70b..1b4102cf58 100644
--- a/src/util/virrandom.c
+++ b/src/util/virrandom.c
@@ -158,7 +158,6 @@ virRandomGenerateWWN(char **wwn,
return -1;
}
- *wwn = g_strdup_printf("5" "%s%09llx", oui,
- (unsigned long long)virRandomBits(36));
+ *wwn = g_strdup_printf("5%s%09" PRIx64, oui, virRandomBits(36));
return 0;
}
--
2.27.0