Re: [PATCH 3/6] "agent" command capability argument and autocompletion

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

 



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