mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-25 21:24:16 +08:00
core: Remove pointless temporary adapter path variable
This commit is contained in:
parent
d6278e4132
commit
f94eba715c
@ -3786,23 +3786,21 @@ static int adapter_register(struct btd_adapter *adapter,
|
||||
uint32_t current_settings,
|
||||
uint32_t supported_settings)
|
||||
{
|
||||
char path[MAX_PATH_LENGTH];
|
||||
|
||||
if (adapter_find_by_id(adapter->dev_id)) {
|
||||
error("Unable to register adapter: hci%d already exist",
|
||||
adapter->dev_id);
|
||||
return -EALREADY;
|
||||
}
|
||||
|
||||
snprintf(path, sizeof(path), "/org/bluez/hci%d", adapter->dev_id);
|
||||
adapter->path = g_strdup(path);
|
||||
adapter->path = g_strdup_printf("/org/bluez/hci%d", adapter->dev_id);
|
||||
|
||||
if (!g_dbus_register_interface(btd_get_dbus_connection(),
|
||||
path, ADAPTER_INTERFACE,
|
||||
adapter->path, ADAPTER_INTERFACE,
|
||||
adapter_methods, NULL,
|
||||
adapter_properties, adapter,
|
||||
adapter_free)) {
|
||||
error("Adapter interface init failed on path %s", path);
|
||||
error("Adapter interface init failed on path %s",
|
||||
adapter->path);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -21,8 +21,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define MAX_PATH_LENGTH 64
|
||||
|
||||
void dict_append_entry(DBusMessageIter *dict,
|
||||
const char *key, int type, void *val);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user