diff options
author | Fam Zheng <famz@redhat.com> | 2016-09-21 12:27:15 +0800 |
---|---|---|
committer | Fam Zheng <famz@redhat.com> | 2016-09-23 11:42:52 +0800 |
commit | 3630be75d8eda7811f5783d1dc50f4d8682fdaec (patch) | |
tree | 3c31b61fa36e0bc9f4452d47b15c3348f431e1eb | |
parent | cea25275a3590cdee774a1230f4b99f6c5c0eaa8 (diff) |
uuid: Make null_uuid static
So that it doesn't have to be zeroed at each call.
Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Message-Id: <1474432046-325-3-git-send-email-famz@redhat.com>
-rw-r--r-- | util/uuid.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |