Re: [RFC v2 04/16] HoG: discover all characteristics declaration

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

 



2012/4/20 Anderson Lizardo <anderson.lizardo@xxxxxxxxxxxxx>:
> Hi João,
>
> 2012/4/18 João Paulo Rechi Vita <jprvita@xxxxxxxxxxxxx>:
>> +static void report_free(struct report *report)
>> +{
>> +       g_free(report->decl);
>> +       g_free(report);
>> +}
>
> We usually avoid casts (like you do later on the g_slist_free_full()
> call), by having:
>
> static void report_free(void *data)
> {
>        struct report *report = data;
> ...
> }
>
>> @@ -153,6 +203,7 @@ int hog_device_register(struct btd_device *device, const char *path)
>>  static void hog_device_free(struct hog_device *hogdev)
>>  {
>>        btd_device_unref(hogdev->device);
>> +       g_slist_free_full(hogdev->reports, (GDestroyNotify) report_free);
>
> You can then drop the cast above.
>
>>        g_free(hogdev->path);
>>        g_free(hogdev->hog_primary);
>>        g_free(hogdev);
>

Fixed.

-- 
João Paulo Rechi Vita
Openbossa Labs - INdT
--
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