From: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
To: Alex Deymo <deymo@chromium.org>
Cc: linux-bluetooth@vger.kernel.org, keybuk@chromium.org,
marcel@holtmann.org
Subject: Re: [PATCH 3/6] "agent" command capability argument and autocompletion
Date: Thu, 14 Mar 2013 17:41:49 -0300 [thread overview]
Message-ID: <20130314204149.GF2649@samus> (raw)
In-Reply-To: <CAGd9gwjK_9pJ2ooRT2NLDRxwk4mToZ3cPxEjPj1mz8n0P_52Aw@mail.gmail.com>
Hi Alex,
On 13:32 Thu 14 Mar, Alex Deymo wrote:
> Thanks for the comments.
> agent_capability_options[] was intended to be use in
> parse_argument_agent(), but I finally reused agent_arguments[] since
> the two extra cases (on, off) are handled before. I'll fix this (and
> the indentation thing).
>
> > > + if (!arg || !strlen(arg)) {
> > Even if it's not strictly enforced, in userspace code there's a tendency to
> > use explicit checks for NULL and 0.
> >
> > This also applies for the strcmp()'s that are done just bellow.
>
> I'm not sure if I properly understand this comment. If arg is NULL it
> will fall in the first return FALSE, not calling any strcmp() because
> of the lazy or operator, right?
I was referring to the fact that in BlueZ (userspace code) the idiom
"strcmp(x, y) == 0" is more common than "!strcmp(x, y)". But I agree that
I wasn't clear enough.
>
> Alex.
Cheers,
--
Vinicius
next prev parent reply other threads:[~2013-03-14 20:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 18:22 [PATCH 0/6] bluetoothctl: agent's implementation Alex Deymo
2013-03-14 18:22 ` [PATCH 1/6] Add color modifiers to NEW, CHG and DEL events Alex Deymo
2013-03-14 18:22 ` [PATCH 2/6] Right prompt management on agent input Alex Deymo
2013-03-14 19:32 ` Vinicius Costa Gomes
2013-03-14 23:26 ` Alex Deymo
2013-03-14 18:22 ` [PATCH 3/6] "agent" command capability argument and autocompletion Alex Deymo
2013-03-14 19:47 ` Vinicius Costa Gomes
2013-03-14 20:00 ` Vinicius Costa Gomes
2013-03-14 20:32 ` Alex Deymo
2013-03-14 20:41 ` Vinicius Costa Gomes [this message]
2013-03-14 22:08 ` Alex Deymo
2013-03-15 3:47 ` Alex Deymo
2013-03-14 18:22 ` [PATCH 4/6] Agent's DisplayPincode implementation Alex Deymo
2013-03-14 18:22 ` [PATCH 5/6] Agent's DisplayPasskey implementation Alex Deymo
2013-03-14 19:51 ` Vinicius Costa Gomes
2013-03-14 20:45 ` Anderson Lizardo
2013-03-14 18:22 ` [PATCH 6/6] Agent's RequestPasskey implementation Alex Deymo
2013-03-15 3:54 ` Alex Deymo
2013-03-15 3:52 ` [PATCH 5/6] Agent's DisplayPasskey implementation Alex Deymo
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=20130314204149.GF2649@samus \
--to=vinicius.gomes@openbossa.org \
--cc=deymo@chromium.org \
--cc=keybuk@chromium.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
/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