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>
This commit is contained in:
parent
cea25275a3
commit
3630be75d8
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user