Re: [PATCH] Make builtin-reset.c use parse_options.
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Mar 2, 2008, 21:38 UTC
- Message-ID
- <20080302213843.GA13954@steel.home>
- In-Reply-To
- <1b46aba20803021040ofec56b9q120a654a192eec09@mail.gmail.com>
Carlos Rica, Sun, Mar 02, 2008 19:40:09 +0100:
Show 5 quoted lines
> On Sun, Mar 2, 2008 at 4:55 PM, Alex Riesen <raa.lkml@gmail.com> wrote:
> >
> > "static const struct option options[] = {"
>
> The other files using parse_options have only "static", or nothing.Well, they all miss something. Besides all nice things about static syntax checking, the compiler (GCC) can optimize string constants to use the same data (not that it is interesting in this particular case).
> To make "options" static, then reset_type and quiet should be > static too, otherwise it cannot compile (in my system).
Of course. Is it a problem for user-interface level code?
> I don't know benefits of making all of them "static".
It is initialized statically.
> Has this been discussed previously?
Yeah. Sometime around 1972.