Re: [PATCH v7 01/18] tools: Add gendwarfksyms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux