From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=58613 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq6WB-0003oD-9D for qemu-devel@nongnu.org; Mon, 30 Aug 2010 11:43:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oq6WA-0004p9-7S for qemu-devel@nongnu.org; Mon, 30 Aug 2010 11:43:31 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:45677) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq6WA-0004p0-44 for qemu-devel@nongnu.org; Mon, 30 Aug 2010 11:43:30 -0400 Received: by qwh5 with SMTP id 5so5210780qwh.4 for ; Mon, 30 Aug 2010 08:43:29 -0700 (PDT) Message-ID: <4C7BD19E.1050604@codemonkey.ws> Date: Mon, 30 Aug 2010 10:43:26 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1283182547-26116-1-git-send-email-Jes.Sorensen@redhat.com> <1283182547-26116-5-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1283182547-26116-5-git-send-email-Jes.Sorensen@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 04/14] Zero initialize timespec struct explicitly List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jes.Sorensen@redhat.com Cc: kwolf@redhat.com, qemu-devel@nongnu.org On 08/30/2010 10:35 AM, Jes.Sorensen@redhat.com wrote: > From: Jes Sorensen > > Signed-off-by: Jes Sorensen > --- > linux-aio.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/linux-aio.c b/linux-aio.c > index 68f4b3d..3240996 100644 > --- a/linux-aio.c > +++ b/linux-aio.c > @@ -118,7 +118,7 @@ static void qemu_laio_completion_cb(void *opaque) > struct io_event events[MAX_EVENTS]; > uint64_t val; > ssize_t ret; > - struct timespec ts = { 0 }; > + struct timespec ts = { 0, 0 }; > I don't like these. What's wrong with { } or { 0 }? Implicit zeroing of members is a critical feature of structure initialization so if there is something wrong with this, it's important to know why because otherwise we've got a massive amount of broken code. Regards, Anthony Liguori > int nevents, i; > > do { >