On Fri, Dec 20, 2024 at 6:07 AM Sami Tolvanen <[email protected]> wrote:
> +int main(int argc, char **argv)
> +{
> + unsigned int n;
> + int opt;
> +
> + struct option opts[] = { { "debug", 0, NULL, 'd' },
You can add "static const" to opts[] here.
I like the array initializer formatted like follows:
static const struct option opts[] = {
{ "debug", 0, NULL, 'd' },
{ "dump-dies", 0, &dump_dies, 1 },
{ "help", 0, NULL, 'h' },
{ 0, 0, NULL, 0 }
};
> + { "dump-dies", 0, &dump_dies, 1 },
> + { "help", 0, NULL, 'h' },
> + { 0, 0, NULL, 0 } };
> +
--
Best Regards
Masahiro Yamada