2012-05-11 03:41:20

by Paulo Alcantara

[permalink] [raw]
Subject: [PATCH] event: Remove unused variable

"srcaddr" variable is not used for anything else in
btd_event_remote_name() function. So, remove it for now.
---
src/event.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/src/event.c b/src/event.c
index 514744b..8ecb942 100644
--- a/src/event.c
+++ b/src/event.c
@@ -318,7 +318,6 @@ void btd_event_remote_class(bdaddr_t *local, bdaddr_t *peer, uint32_t class)
void btd_event_remote_name(bdaddr_t *local, bdaddr_t *peer, char *name)
{
struct btd_adapter *adapter;
- char srcaddr[18];
struct btd_device *device;
struct remote_dev_info *dev_info;

@@ -339,8 +338,6 @@ void btd_event_remote_name(bdaddr_t *local, bdaddr_t *peer, char *name)
if (!get_adapter_and_device(local, peer, &adapter, &device, FALSE))
return;

- ba2str(local, srcaddr);
-
dev_info = adapter_search_found_devices(adapter, peer);
if (dev_info) {
g_free(dev_info->name);
--
1.7.7.6



2012-05-11 14:26:48

by Paulo Alcantara

[permalink] [raw]
Subject: Re: [PATCH] event: Remove unused variable

Hi Luiz,

On Fri, May 11, 2012 at 10:31 AM, Luiz Augusto von Dentz
<[email protected]> wrote:
> I believe the correct prefix here would be core, IMO event is too
> generic. Other than that the patch looks good.

Yes, you're right. I'll change the prefix to "core" and then resend it.

Thanks for pointing it out!


-Paulo

2012-05-11 13:31:15

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH] event: Remove unused variable

Hi Paulo,

On Thu, May 10, 2012 at 8:41 PM, Paulo Alcantara
<[email protected]> wrote:
> "srcaddr" variable is not used for anything else in
> btd_event_remote_name() function. So, remove it for now.
> ---
> ?src/event.c | ? ?3 ---
> ?1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/src/event.c b/src/event.c
> index 514744b..8ecb942 100644
> --- a/src/event.c
> +++ b/src/event.c
> @@ -318,7 +318,6 @@ void btd_event_remote_class(bdaddr_t *local, bdaddr_t *peer, uint32_t class)
> ?void btd_event_remote_name(bdaddr_t *local, bdaddr_t *peer, char *name)
> ?{
> ? ? ? ?struct btd_adapter *adapter;
> - ? ? ? char srcaddr[18];
> ? ? ? ?struct btd_device *device;
> ? ? ? ?struct remote_dev_info *dev_info;
>
> @@ -339,8 +338,6 @@ void btd_event_remote_name(bdaddr_t *local, bdaddr_t *peer, char *name)
> ? ? ? ?if (!get_adapter_and_device(local, peer, &adapter, &device, FALSE))
> ? ? ? ? ? ? ? ?return;
>
> - ? ? ? ba2str(local, srcaddr);
> -
> ? ? ? ?dev_info = adapter_search_found_devices(adapter, peer);
> ? ? ? ?if (dev_info) {
> ? ? ? ? ? ? ? ?g_free(dev_info->name);
> --
> 1.7.7.6

I believe the correct prefix here would be core, IMO event is too
generic. Other than that the patch looks good.


--
Luiz Augusto von Dentz