From: Johan Hedberg <johan.hedberg@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 3/7] mesh: Make meshctl use bt_shell helpers
Date: Fri, 8 Dec 2017 09:01:34 +0200 [thread overview]
Message-ID: <20171208070134.GA29604@x1c.home> (raw)
In-Reply-To: <20171207122152.29743-3-luiz.dentz@gmail.com>
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
next prev parent reply other threads:[~2017-12-08 7:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 12:21 [PATCH BlueZ 1/7] shared/shell: Omit menu command if there are no submenus Luiz Augusto von Dentz
2017-12-07 12:21 ` [PATCH BlueZ 2/7] shared/shell: Don't remove command from arguments Luiz Augusto von Dentz
2017-12-07 12:21 ` [PATCH BlueZ 3/7] mesh: Make meshctl use bt_shell helpers Luiz Augusto von Dentz
2017-12-08 7:01 ` Johan Hedberg [this message]
2017-12-08 10:53 ` Luiz Augusto von Dentz
2017-12-07 12:21 ` [PATCH BlueZ 4/7] tools/obexctl: Use " Luiz Augusto von Dentz
2017-12-07 12:21 ` [PATCH BlueZ 5/7] tools/bluetooth-player: " Luiz Augusto von Dentz
2017-12-07 12:21 ` [PATCH BlueZ 6/7] tools/bluetooth-player: Fix arg format for search command Luiz Augusto von Dentz
2017-12-07 12:21 ` [PATCH BlueZ 7/7] client: Fix arguments of set-filter-clear Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171208070134.GA29604@x1c.home \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).