[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] lib/argp-help.c patch
From: |
Albert Chin |
Subject: |
Re: [bug-gnulib] lib/argp-help.c patch |
Date: |
Tue, 11 Jan 2005 12:27:03 -0600 |
User-agent: |
Mutt/1.5.6i |
On Tue, Jan 11, 2005 at 11:26:59AM +0100, Stepan Kasal wrote:
> On Mon, Jan 10, 2005 at 07:48:10PM -0600, Albert Chin wrote:
> > Initializing a struct with non-constant initializers is not
> > C89-compliant
>
> > +++ lib/argp-help.c 10 Jan 2005 20:45:12 -0000
> ...
> > - struct pentry_state pest = { entry, stream, hhstate, 1, state };
> > + struct pentry_state pest = { NULL, NULL, NULL, 1, NULL };
> > +
> > + pest.entry = entry;
> > + pest.stream = stream;
> > + pest.hhstate = hhstate;
> > + pest.state = state;
>
> Why not:
>
> + struct pentry_state pest;
> +
> + pest.entry = entry;
> + pest.stream = stream;
> + pest.hhstate = hhstate;
> + pest.first = 1;
> + pest.state = state;
>
> It's not much important that it brings compatibility with some compilers
> which are not fully C89 compliant. But I think the code is more readable
> this way.
That's fine.
--
albert chin (address@hidden)