Re: [PATCH v7 01/18] tools: Add gendwarfksyms
From: Masahiro Yamada
Date: Fri Dec 27 2024 - 01:02:10 EST
On Fri, Dec 20, 2024 at 6:07 AM Sami Tolvanen <samitolvanen@xxxxxxxxxx> 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