Thread (12 messages) 12 messages, 3 authors, 2004-01-31

Re: [Bluez-devel] [PATCH] Bluetooth address specific device configuration

flat view

From: Marcel Holtmann <marcel@holtmann.org>
Date: 2004-01-31 18:09:14

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.
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help