Re: [PATCH BlueZ 3/7] mesh: Make meshctl use bt_shell helpers

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

 



Hi Luiz,

On Thu, Dec 07, 2017, Luiz Augusto von Dentz wrote:
> -static void set_scan_filter_uuids(const char *arg)
> +static void set_scan_filter_uuids(int argc, char *argv[])
>  {
>  	g_strfreev(filtered_scan_uuids);
>  	filtered_scan_uuids = NULL;
>  	filtered_scan_uuids_len = 0;
>  
> -	if (!arg || !strlen(arg))
> +	if (argc < 2 || !strlen(argv[1]))

This function seems to be called for string arrays like { UUID, NULL },
with argc == 1, so the above check looks broken to me. Actually, it
seems like this function is not used as a normal command handler, so why
is it dressed up like one (just causes confusion and potential bugs like
this)?

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