Re: [PATCH 1/6] android: Remove reduntant structure

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

 



Hi Jakub,

On Tue, Oct 29, 2013, Jakub Tyszkowski wrote:
> ---
>  android/adapter.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/android/adapter.c b/android/adapter.c
> index 15b65e5..7e5c1a1 100644
> --- a/android/adapter.c
> +++ b/android/adapter.c
> @@ -234,12 +234,11 @@ static void load_link_keys(GSList *keys)
>  {
>  	struct mgmt_cp_load_link_keys *cp;
>  	size_t key_len = g_slist_length(keys);
> -	struct mgmt_link_key_info *key;
>  	size_t len;
>  
>  	DBG("");
>  
> -	len = sizeof(*cp) + key_len * sizeof(*key);
> +	len = sizeof(*cp) + key_len * sizeof(struct mgmt_link_key_info);
>  	cp = g_malloc0(len);
>  
>  	cp->debug_keys = 0;

If the point of the keys list is to contain struct mgmt_link_key_info
entries I'd rather fix this function to properly fill in the mgmt
command with those since right now it's broken if the list contains any
entries at all.

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