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

From
Marcel Holtmann <marcel@holtmann.org>
Date
2004-01-31 15:59:49
Reply to
Fredrik Noring, 2004-01-31
Hi Fredrik,
As far as I can see there is only one misplaced space and two 
misplaced '{' characters in the entire patch, on lines 93, 312
and 331 in main.c. :)
I have seen more. Also misplaced comments ;)

One other thing.

static void init_device_defaults(struct device_opts *device_opts)
{
       device_opts->name        = 0;
       device_opts->class       = 0;
       device_opts->pkt_type    = 0;
       device_opts->scan        = SCAN_PAGE | SCAN_INQUIRY;
       device_opts->link_mode   = 0;
       device_opts->link_policy = 0;
       device_opts->auth        = 0;
       device_opts->encrypt     = 0;
}

This is too much and not needed, because we can use memset().

	memset(device_opts, 0, sizeof(*device_opts));
	device_opts->scan = SCAN_PAGE | SCAN_INQUIRY;

I know one function later it is used in the same style, but I don't like
it either. And of course in this case inlining the function is a good
idea.

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
Thread (12 messages) 12 messages, 3 authors, 2004-01-31
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help