[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v9 02/13] uuid: Make null_uuid static
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v9 02/13] uuid: Make null_uuid static |
Date: |
Wed, 21 Sep 2016 12:27:15 +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>
Reviewed-by: Jeff Cody <address@hidden>
---
util/uuid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/uuid.c b/util/uuid.c
index 6815904..f0c1eeb 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
- [Qemu-devel] [PATCH v9 00/13] UUID clean ups for 2.8, Fam Zheng, 2016/09/21
- [Qemu-devel] [PATCH v9 01/13] util: Add UUID API, Fam Zheng, 2016/09/21
- [Qemu-devel] [PATCH v9 02/13] uuid: Make null_uuid static,
Fam Zheng <=
- [Qemu-devel] [PATCH v9 03/13] vhdx: Use QEMU UUID API, Fam Zheng, 2016/09/21
- [Qemu-devel] [PATCH v9 04/13] vdi: Use QEMU UUID API, Fam Zheng, 2016/09/21
- [Qemu-devel] [PATCH v9 05/13] vpc: Use QEMU UUID API, Fam Zheng, 2016/09/21
- [Qemu-devel] [PATCH v9 06/13] crypto: Switch to QEMU UUID API, Fam Zheng, 2016/09/21
- [Qemu-devel] [PATCH v9 07/13] tests: No longer dependent on CONFIG_UUID, Fam Zheng, 2016/09/21
- [Qemu-devel] [PATCH v9 08/13] configure: Remove detection code for UUID, Fam Zheng, 2016/09/21
- [Qemu-devel] [PATCH v9 10/13] uuid: Tighten uuid parse, Fam Zheng, 2016/09/21
- [Qemu-devel] [PATCH v9 09/13] vl: Switch qemu_uuid to QemuUUID, Fam Zheng, 2016/09/21