From: Marcel Holtmann <marcel@holtmann.org>
To: Fredrik Noring <noring@nocrew.org>
Cc: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] [PATCH] Bluetooth address specific device configuration
Date: Sat, 31 Jan 2004 19:09:14 +0100 [thread overview]
Message-ID: <1075572554.2720.67.camel@pegasus> (raw)
In-Reply-To: <1075565699.14644.186.camel@akka.yeti.nocrew.org>
Hi Fredrik,
> The "char *ref" comment in hcid.h? I understand the kernel people you
> referred to before use this type of comment as well. :)
no, this comment is correct.
> The other three comments do not refer to the if:s but the code inside
> each if. So I don't think these are misplaced either.
/* First try to get BD_ADDR based settings ... */
di.dev_id = hdev;
if (!ioctl(sock, HCIGETDEVINFO, (void *) &di))
device_opts = get_bdaddr_device_opts(&di.bdaddr);
/* ... then try HCI based settings ... */
if (!device_opts)
device_opts = get_hci_device_opts(hdev);
/* ... and last use the default settings. */
if (!device_opts)
device_opts = &default_device;
Make it look like this. It is much more easier to read :)
> More places? That's the only comments I know of...
Not comments. Whitespaces and braces.
> > And of course in this case inlining the function is a good idea.
>
> Why is that?
Short code that only init a structure can be inlined.
Regards
Marcel
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2004-01-31 18:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-28 18:56 [Bluez-devel] [PATCH] Bluetooth address specific device configuration Fredrik Noring
2004-01-28 19:24 ` Fredrik Noring
2004-01-28 23:16 ` Achim Bohnet
2004-01-29 18:29 ` Fredrik Noring
2004-01-29 5:52 ` Marcel Holtmann
2004-01-29 19:39 ` Fredrik Noring
2004-01-29 19:58 ` Fredrik Noring
2004-01-31 15:30 ` Marcel Holtmann
2004-01-31 15:49 ` Fredrik Noring
2004-01-31 15:59 ` Marcel Holtmann
2004-01-31 16:15 ` Fredrik Noring
2004-01-31 18:09 ` Marcel Holtmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-01-29 10:38 Nosve
2004-01-31 19:04 ` Marcel Holtmann
2004-02-03 13:32 ` Fredrik Noring
2004-02-01 19:20 nosve
2004-02-01 23:27 ` Marcel Holtmann
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=1075572554.2720.67.camel@pegasus \
--to=marcel@holtmann.org \
--cc=bluez-devel@lists.sourceforge.net \
--cc=noring@nocrew.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