Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MVqQx-00066h-Ah for qemu-devel@nongnu.org; Tue, 28 Jul 2009 13:25:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MVqQs-00064w-Jz for qemu-devel@nongnu.org; Tue, 28 Jul 2009 13:25:50 -0400 Received: from [199.232.76.173] (port=56875 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVqQs-00064f-CP for qemu-devel@nongnu.org; Tue, 28 Jul 2009 13:25:46 -0400 Received: from mx2.redhat.com ([66.187.237.31]:58521) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MVqQr-0005Np-6p for qemu-devel@nongnu.org; Tue, 28 Jul 2009 13:25:45 -0400 In-Reply-To: (malc's message of "Tue\, 28 Jul 2009 20\:48\:35 +0400 \(MSD\)") References: From: Juan Quintela Date: Tue, 28 Jul 2009 19:23:42 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 3/4] Use C99 initializers for audio_option List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org malc wrote: > On Tue, 28 Jul 2009, Juan Quintela wrote: > >> malc wrote: >> > On Mon, 27 Jul 2009, Juan Quintela wrote: >> > >> > I'd prefer: >> > >> > { .name = "DAC_SIZE_IN_USEC", >> > .tag = AUD_OPT_BOOL, >> > .valp = &conf.size_in_usec_out, >> > .descr = "DAC period/buffer size in microseconds (otherwise in frames)" }, >> > { ... >> > >> > And likewise elsewhere. >> >> I tried to be consistent with the qdev patches, they add all its "arrays >> of structures" this way (it is one of the bigger users of the feature >> that I saw). > > Let's look at original example: > > + { > + .name = "DAC_SIZE_IN_USEC", > + .tag = AUD_OPT_BOOL, > + .valp = &conf.size_in_usec_out, > + .descr = "DAC period/buffer size in microseconds (otherwise in frames)" > + },{ > > It's internally inconsistent (begins with a bsd style ends with k&r, > and on top of that without space after comma). Should either be done > the way i mentioned earlier or with: > > { > ... > }, > { > } > > And i much prefer the former. I was trying to be consistent with rest of qemu: (simple-config-7*)$ find . -name "*.[ch]" | xargs grep " },{$" | wc -l 42 (simple-config-7*)$ find . -name "*.[ch]" | xargs grep " }, {$" | wc -l 18 I don't mean going one way or the other, but I would like that everbody decided what was the "right" position of the braces. If possible, not one style by directory. Later, Juan.