From 3630be75d8eda7811f5783d1dc50f4d8682fdaec Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Wed, 21 Sep 2016 12:27:15 +0800 Subject: [PATCH] uuid: Make null_uuid static So that it doesn't have to be zeroed at each call. Suggested-by: Eric Blake Signed-off-by: Fam Zheng Reviewed-by: Jeff Cody Message-Id: <1474432046-325-3-git-send-email-famz@redhat.com> --- util/uuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/uuid.c b/util/uuid.c index 6815904435..f0c1eeb527 100644 --- a/util/uuid.c +++ b/util/uuid.c @@ -40,7 +40,7 @@ void qemu_uuid_generate(QemuUUID *uuid) int qemu_uuid_is_null(const QemuUUID *uu) { - QemuUUID null_uuid = { 0 }; + static QemuUUID null_uuid; return memcmp(uu, &null_uuid, sizeof(QemuUUID)) == 0; }