RE: [PATCH v2 1/3] Clean SAP server error printouts

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

 



Johan, 

>On Mon, May 30, 2011, Waldemar Rymarkiewicz wrote:
>> @@ -387,8 +385,10 @@ static int disconnect_req(struct sap_connection 
>> *conn, uint8_t disc_type)
>>  
>>  	case SAP_DISCONNECTION_TYPE_CLIENT:
>>  		if (conn->state != SAP_STATE_CONNECTED &&
>> -				conn->state != 
>SAP_STATE_GRACEFUL_DISCONNECT)
>> -			goto error_rsp;
>> +				conn->state != 
>SAP_STATE_GRACEFUL_DISCONNECT) {
>> +			sap_error_rsp(conn);
>> +			goto error_req;
>> +		}
>
>Since all of the case statements return from the function in 
>the non-error case, and all the error_req label is doing is a 
>single return statment, I think it'd be cleaner (easier to 
>follow the code flow) by removing the label and do "return 
>-EPERM;" directly instead of a goto.
>

sure, but I guess it should  go to seperate patch as it does not seem to have something to do with cleaning printouts :)

Waldek--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux