util/uuid: Define UUID_STR_LEN from UUID_NONE string
PATCH 1/1 util/uuid: Define UUID_STR_LEN from UUID_NONE string
Cc Fam Zheng <[email protected]>
Suggested-by Philippe Mathieu-Daudé <[email protected]>
Signed-off-by Cédric Le Goater <[email protected]>
---
Follow up on :
https://lore.kernel.org/qemu-devel/[email protected]/
include/qemu/uuid.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
include/qemu/uuid.h +3 -2
@@ -78,9 +78,10 @@ typedef struct {"%02hhx%02hhx-" \"%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx" -#define UUID_STR_LEN (36 + 1) - #define UUID_NONE "00000000-0000-0000-0000-000000000000" +QEMU_BUILD_BUG_ON (sizeof (UUID_NONE ) -1 !=36 ); + +#define UUID_STR_LEN sizeof(UUID_NONE)void qemu_uuid_generate (QemuUUID *out);
Signature · 1 line
2.41.0
Quoted 11 lines · Cédric Le Goater
Cc Fam Zheng <[email protected]>Suggested-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Cédric Le Goater <[email protected]>---
Follow up on :
https://lore.kernel.org/qemu-devel/[email protected]/
include/qemu/uuid.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Thanks!
Cédric Le Goater
AppliedQuoted 19 lines · Cédric Le Goater
Cc Fam Zheng <[email protected]>Suggested-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Cédric Le Goater <[email protected]>---
Follow up on :
https://lore.kernel.org/qemu-devel/[email protected]/
include/qemu/uuid.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)include/qemu/uuid.h +0
-0@@ -78,9 +78,10 @@ typedef struct {"%02hhx%02hhx-" \"%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"
include/qemu/uuid.h typedef struct { · line 87
Quoted 10 lines
include/qemu/uuid.h +3
-2-#define UUID_STR_LEN (36 + 1) -#define UUID_NONE "00000000-0000-0000-0000-000000000000" +QEMU_BUILD_BUG_ON (sizeof (UUID_NONE ) -1 !=36 ); + +#define UUID_STR_LEN sizeof(UUID_NONE)void qemu_uuid_generate (QemuUUID *out);
Applied to vfio-next.
Thanks,
C.