Re: [PATCH v2 2/5] Change CreatePairedDevice to support LE devices

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

 



Hi,

> +static struct btd_device *create_common(DBusConnection *conn,

I don't really like this name since it doesn't explain what the function
does in any way except that it creates "something". Could you call it
e.g. __create_device() or create_device_internal()?

> +	if (type == DEVICE_TYPE_LE && !event_is_connectable(dev->evt_type)) {
> +		if (force)
> +			goto create;
> +
> +		if (err)
> +			*err = -ENOTCONN;
> +
> +		return NULL;
> +	}
> +
> +create:

You could avoid the label and goto by simply adding if (!force && type...
to the beginning of the if-statement.

> +int device_browse_primary(struct btd_device *device, DBusConnection *conn,
> +				DBusMessage *msg, gboolean sec_level_high)

Could you call the gboolean parameter just "secure"?

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