Re: [PATCH BlueZ] shared/queue: Fix not allowing to remove NULL entries

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

 



Hi,

On Tue, Jul 29, 2014 at 5:29 PM, Luiz Augusto von Dentz
<luiz.dentz@xxxxxxxxx> wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
>
> queue_remove should not check the data pointer since both queue_push_head
> and queue_push_tail don't check it is possible to have NULL pointers in
> the queue therefore queue_remove shall be able to remove them.
> ---
>  src/shared/queue.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/shared/queue.c b/src/shared/queue.c
> index 3bdc1ec..3ca3ca6 100644
> --- a/src/shared/queue.c
> +++ b/src/shared/queue.c
> @@ -238,7 +238,7 @@ bool queue_remove(struct queue *queue, void *data)
>  {
>         struct queue_entry *entry, *prev;
>
> -       if (!queue || !data)
> +       if (!queue)
>                 return false;
>
>         for (entry = queue->head, prev = NULL; entry;
> --
> 1.9.3

Applied.


-- 
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