Hi Johan, On Fri, Dec 8, 2017 at 5:01 AM, Johan Hedberg <johan.hedberg@xxxxxxxxx> wrote: > 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)? It was copied from bluetoothctl where it is a command, there are a bunch of commands like this. Anyway Ive fixed this in v2 and rework the parameters. -- 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