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]
Message-ID: <A5940078-2624-4F28-859A-9F11C1F5058A@getmailspring.com>
Date:   Sat, 27 Nov 2021 09:33:19 +0800
From:   Zackary Liu <zackary.liu.pro@...il.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     "masahiroy@...nel.org" <masahiroy@...nel.org>,
        "ripxorip@...il.com" <ripxorip@...il.com>,
        "mpe@...erman.id.au" <mpe@...erman.id.au>,
        "linux-kernel@...r.kernel.org" 
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scripts/tags: merge "TAGS" and "tags" in case


On Nov 26 2021, at 11:58 pm, Greg KH <gregkh@...uxfoundation.org> wrote:

> On Wed, Nov 03, 2021 at 11:35:29PM +0800, Zhaoyu Liu wrote:
>> merge "TAGS" and "tags" for the code more concise
>> 
>> Signed-off-by: Zhaoyu Liu <zackary.liu.pro@...il.com>
>> ---
>>  scripts/tags.sh | 14 +++++---------
>>  1 file changed, 5 insertions(+), 9 deletions(-)
>> 
>> diff --git a/scripts/tags.sh b/scripts/tags.sh
>> index 16d475b3e203..a9181dd0fee2 100755
>> --- a/scripts/tags.sh
>> +++ b/scripts/tags.sh
>> @@ -315,15 +315,11 @@ case "$1" in
>>  		dogtags
>>  		;;
>>  
>> -	"tags")
>> -		rm -f tags
>> -		xtags ctags
>> -		remove_structs=y
>> -		;;
>> -
>> -	"TAGS")
>> -		rm -f TAGS
>> -		xtags etags
>> +	"TAGS" | "tags")
>> +		rm -f $1
>> +		xtags $([ $1 = "tags" ]	\
>> +			&& echo ctags		\
>> +			|| echo etags)
>>  		remove_structs=y
>>  		;;
> 
> Ick, that's much harder to read and understand.
> 
> What is wrong with the existing code?  It's obvious and makes sense, it
> is not duplicating any lines here except the one "remove_structs=y"
> which is fine.
> 
> I'm not going to take this, sorry.
> 
> greg k-h
> 

Ok you're right, Easy to understand is better.
Thank you.

zackary

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ