From: Fam Zheng Date: Wed, 21 Sep 2016 04:27:15 +0000 (+0800) Subject: uuid: Make null_uuid static X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~10^2~14^2~5^2~170^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3630be75d8eda7811f5783d1dc50f4d8682fdaec;p=sdk%2Femulator%2Fqemu.git 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> --- 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; }