Re: [PATCH 4/5] adaptername: Remove not needed empty remove callback
From: Anderson Lizardo <hidden>
Date: 2012-11-26 12:57:19
Hi Szymon, On Mon, Nov 26, 2012 at 6:52 AM, Szymon Janc [off-list ref] wrote:
On Monday 26 of November 2012 12:45:30 Anderson Lizardo wrote:quoted
Hi Szymon,Hi Anderson,quoted
On Mon, Nov 26, 2012 at 5:07 AM, Szymon Janc [off-list ref] wrote:quoted
static struct btd_adapter_driver adaptername_driver = { .name = "adaptername", .probe = adaptername_probe, - .remove = adaptername_remove, + .remove = NULL, };This variable is static, so not explicitly initialized members will be NULL.Yes, yet according to code style for bluez statics should be initialized explicitly, right? Or this does not count for struct members?
I forgot to mention that I did run this: egrep -r '^[[:space:]]*\.[a-z_]+[[:space:]]*=.*NULL' * with no results, which means no other structs are initializing unused members with NULL. But you are right that we are still initializing non-compound static variables explicitly to NULL or 0, as per convention. Best Regards, -- Anderson Lizardo Instituto Nokia de Tecnologia - INdT Manaus - Brazil