Re: [PATCH BlueZ 1/3] att: Add prepare write support

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

 



Hi Sergio,

On Sat, Jul 28, 2012 at 9:47 PM, Sergio Correia <lists@xxxxxxxx> wrote:
>> +uint16_t enc_prep_write_req(uint16_t handle, uint16_t offset,
>> +                       const uint8_t *value, int vlen, uint8_t *pdu, int len)
>> +{
>> +       const uint16_t min_len = sizeof(pdu[0]) + sizeof(handle) +
>> +                                                               sizeof(offset);
>> +
>> +       if (pdu == NULL)
>> +               return 0;
>> +
>> +       if (len < min_len)
>> +               return 0;
>
> maybe it would be better to check the above conditions in a single if statement?

I think Eder is following the same style from the other similar
functions in the same file. I would suggest leaving these patches as
is and instead sending a separate patch changing this in all
functions, as a refactoring patch.

My two cents,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
--
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