diff options
author | Cédric Le Goater <clg@redhat.com> | 2023-10-25 12:12:44 +0200 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2023-11-03 09:20:31 +0100 |
commit | 5fe51934b1cd94a75007dd456fecc2ff6ee622e7 (patch) | |
tree | 815cf25324fd1f9293f0bf6bc97b6bd5ea1f2b3a /include | |
parent | 4ef9d97b1a37b8cfd152cc3ac5f9576e406868b1 (diff) |
util/uuid: Define UUID_STR_LEN from UUID_NONE string
Cc: Fam Zheng <fam@euphon.net>
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/uuid.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/qemu/uuid.h b/include/qemu/uuid.h index 356efe7b57..869f84af09 100644 --- a/include/qemu/uuid.h +++ b/include/qemu/uuid.h @@ -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); |