[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 3/4] Use C99 initializers for audio_option
From: |
Juan Quintela |
Subject: |
[Qemu-devel] Re: [PATCH 3/4] Use C99 initializers for audio_option |
Date: |
Tue, 28 Jul 2009 19:23:42 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
malc <address@hidden> wrote:
> On Tue, 28 Jul 2009, Juan Quintela wrote:
>
>> malc <address@hidden> 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.
- [Qemu-devel] Re: [PATCH 1/4] Use proper struct initializers and remove INIT_FIELD() macro, (continued)
[Qemu-devel] [PATCH 2/4] use C99 initializers for audio_pcm_ops, Juan Quintela, 2009/07/27
[Qemu-devel] [PATCH 3/4] Use C99 initializers for audio_option, Juan Quintela, 2009/07/27
[Qemu-devel] [PATCH 4/4] use C99 initializers for all audio/*, Juan Quintela, 2009/07/27
[Qemu-devel] Re: [PATCH 0/4] Use C99 struct initializers in audio/*, Anthony Liguori, 2009/07/27