Re: [PATCH net 2/2] net/smc: align the connect behaviour with TCP

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

 




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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux