Re: [PATCH] shared/att: Remove not needed NULL assignments

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

 



Hi Szymon,

On Tue, Dec 16, 2014 at 4:59 PM, Szymon Janc <szymon.janc@xxxxxxxxx> wrote:
> There is no need to NULL memebers in bt_att_unref casue att if freed
> at the end of function.
> ---
>  src/shared/att.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/src/shared/att.c b/src/shared/att.c
> index 956fa8c..08bf2b2 100644
> --- a/src/shared/att.c
> +++ b/src/shared/att.c
> @@ -860,17 +860,12 @@ void bt_att_unref(struct bt_att *att)
>                 destroy_att_send_op(att->pending_ind);
>
>         io_destroy(att->io);
> -       att->io = NULL;
>
>         queue_destroy(att->req_queue, NULL);
>         queue_destroy(att->ind_queue, NULL);
>         queue_destroy(att->write_queue, NULL);
>         queue_destroy(att->notify_list, NULL);
>         queue_destroy(att->disconn_list, NULL);
> -       att->req_queue = NULL;
> -       att->ind_queue = NULL;
> -       att->write_queue = NULL;
> -       att->notify_list = NULL;
>
>         if (att->timeout_destroy)
>                 att->timeout_destroy(att->timeout_data);
> @@ -879,7 +874,6 @@ void bt_att_unref(struct bt_att *att)
>                 att->debug_destroy(att->debug_data);
>
>         free(att->buf);
> -       att->buf = NULL;
>
>         free(att);
>  }
> --
> 1.9.1

Applied, thanks.


-- 
Luiz Augusto von Dentz
--
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