[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAADnVQL=qhaM9DC7=Bic7ASb0djy9AGtq9L28yM89PpNo0twHw@mail.gmail.com>
Date: Tue, 6 Aug 2019 08:27:24 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Quentin Monnet <quentin.monnet@...ronome.com>
Cc: Peter Wu <peter@...ensteyn.nl>,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
Stanislav Fomichev <sdf@...ichev.me>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Network Development <netdev@...r.kernel.org>,
Stanislav Fomichev <sdf@...gle.com>
Subject: Re: [PATCH] tools: bpftool: fix reading from /proc/config.gz
On Tue, Aug 6, 2019 at 2:36 AM Quentin Monnet
<quentin.monnet@...ronome.com> wrote:
>
> >>> {
> >>> - size_t line_n = 0, optlen = strlen(option);
> >>> - char *res, *strval, *line = NULL;
> >>> - ssize_t n;
> >>> + char *sep;
> >>> + ssize_t linelen;
> >>
> >> Please order the declarations in reverse-Christmas tree style.
> >
> > Does this refer to the type, name, or full line length? I did not find
> > this in CodingStyle, the closest I could get is:
> > https://lore.kernel.org/patchwork/patch/732076/
> >
> > I will assume the line length for now.
>
> I am unsure this is in the CodingStyle, but fairly certain that this is
> a convention for at least network-related code. And yes, as I understand
> it refers to the length of the line.
Let's not over focus on this.
It's a preference, but not a strong requirement.
There are plenty of cases where it shouldn't be followed.
Like logical grouping of variables take precedence of xmas tree.
Powered by blists - more mailing lists