Re: [PATCH v3 4/4] Fix handling asynchronous plugin reads

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

 



On Tue, Jun 14, 2011 at 8:33 AM, Luiz Augusto von Dentz
<luiz.dentz@xxxxxxxxx> wrote:
>> +       if (ret == -EAGAIN) {
>> +               suspend_get(os, os->obex, os->obj);
>> +       } else if (ret < 0) {
>>                os_set_response(os->obj, err);
>>                OBEX_CancelRequest(os->obex, TRUE);
>> -       } else
>> +       } else {
>>                OBEX_ResumeRequest(os->obex);
>> +       }
>
> One line statements do not need {
Kernel coding style states that this is not true when another branch
in the if-else has more than one statement. Then braces should be used
for all branches.
>
>> -       return FALSE;
>> +       if (os->suspended)
>> +               return TRUE;
>> +       else
>> +               return FALSE;
>>  }
>
> I guess here you can just return os->suspended.
I guess I can.

-- 
Slawomir Bochenski
--
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