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] [thread-next>] [day] [month] [year] [list]
Message-ID: <a43ef532-17fb-43f8-35fb-8e40fdaae472@linux.alibaba.com>
Date:   Tue, 10 May 2022 21:03:17 +0800
From:   Guangguan Wang <guangguan.wang@...ux.alibaba.com>
To:     Paolo Abeni <pabeni@...hat.com>
Cc:     kgraul@...ux.ibm.com, davem@...emloft.net, kuba@...nel.org,
        linux-s390@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 2/2] net/smc: align the connect behaviour with TCP



On 2022/5/10 19:05, Paolo Abeni wrote:
>>  	} else {
>>  		rc = __smc_connect(smc);
>> -		if (rc < 0)
>> +		if (rc < 0) {
>>  			goto out;
>> -		else
>> +		} else {
>>  			rc = 0; /* success cases including fallback */
>> +			sock->state = SS_CONNECTED;
> 
> 'else' is not needed here, you can keep the above 2 statements dropping
> an indentation level.
> 
>> +		}
>>  	}
>>  
> 
> You can avoid a little code duplication adding here the following:
> 
> connected:
>    sock->state = SS_CONNECTED;
> 
> and using the new label where appropriate.
> 

Got it, I will modify it in the next version.
Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ