79c4324644
Change-Id: I2d302dda68298877c65c99147f5bf22186a59aac
34 lines
1.1 KiB
Diff
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
|
|
|