lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 20 Apr 2020 10:06:52 -0400
From:   Jon Maloy <jmaloy@...hat.com>
To:     George Spelvin <lkml@....ORG>, David Miller <davem@...emloft.net>
Cc:     tung.q.nguyen@...tech.com.au, ying.xue@...driver.com,
        netdev@...r.kernel.org
Subject: Re: [PATCH] tipc: Remove redundant tsk->published flag



On 4/19/20 4:56 AM, George Spelvin wrote:
> On Sat, Apr 18, 2020 at 03:32:11PM -0700, David Miller wrote:
>> From: George Spelvin <lkml@....org>
>> Date: Thu, 16 Apr 2020 03:27:35 GMT
[...]
>> Please preserve the reverse christmas tree ordering of local variables
>> here.
> Happy to, but is that actually defined anywhere?  "Preserve" implies that
> it was present before the patch, and I can't infer a rule which is obeyed
> by the pre-patch declarations:

It all depends on the age of the code. In newer code, we always follow
the rule, and when refactoring old code at least I try to adapt to this
rule even at the cost of reshuffling a few declarations. It is risk free,
- you only have to watch out for dependencies.

> 	int i = 0;
> 	size_t sz = (dqueues) ? SK_LMAX : SK_LMIN;
> 	struct tipc_sock *tsk;
> 	struct publication *p;
> 	bool tsk_connected;
>
> One option is to sort by the full line length, including initialization:
> 	size_t sz = (dqueues) ? SK_LMAX : SK_LMIN;
> 	struct tipc_sock *tsk;
> 	struct publication *p;
> 	bool tsk_connected;
> 	int i = 0;
This is the preferred order, AFAIK.

///jon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ