mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
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>
This commit is contained in:
parent
f6e88f6113
commit
b857ad0696
@ -154,8 +154,7 @@ 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user