From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blpIW-0000Fw-8d for qemu-devel@nongnu.org; Sun, 18 Sep 2016 23:31:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1blpIV-0007xG-Dr for qemu-devel@nongnu.org; Sun, 18 Sep 2016 23:31:12 -0400 Date: Sun, 18 Sep 2016 23:31:04 -0400 From: Jeff Cody Message-ID: <20160919033104.GB32304@localhost.localdomain> References: <1474172732-31994-1-git-send-email-famz@redhat.com> <1474172732-31994-3-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1474172732-31994-3-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v8 02/12] uuid: Make null_uuid static List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-devel@nongnu.org, kwolf@redhat.com, qemu-block@nongnu.org, sw@weilnetz.de, mdroth@linux.vnet.ibm.com, armbru@redhat.com, pbonzini@redhat.com, mreitz@redhat.com, eblake@redhat.com, rth@twiddle.net On Sun, Sep 18, 2016 at 12:25:22PM +0800, Fam Zheng wrote: > So that it doesn't have to be zeroed at each call. > > Suggested-by: Eric Blake > Signed-off-by: Fam Zheng > --- > 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 > Reviewed-by: Jeff Cody