qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v7 02/12] uuid: Make null_uuid static


From: Fam Zheng
Subject: [Qemu-devel] [PATCH v7 02/12] uuid: Make null_uuid static
Date: Sun, 18 Sep 2016 10:46:17 +0800

So that it doesn't have to be zeroed at each call.

Suggested-by: Eric Blake <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
---
 util/uuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/uuid.c b/util/uuid.c
index 08a7fd3..2e47f4a 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;
 }
 
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]