diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-08-27 20:13:37 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-08-27 20:13:37 +0200 |
commit | 35c816551da6c423d9ee84362ef387a2643a5e7d (patch) | |
tree | 58b490e4963eaa681ea7a9be5e83ce8932af15be /src | |
parent | 88a2c4e2ffb069cb0535f7bab613da114002dab0 (diff) |
Remove unused alloc_device_opts() function
Diffstat (limited to 'src')
-rw-r--r-- | src/hcid.h | 2 | ||||
-rw-r--r-- | src/main.c | 21 |
2 files changed, 0 insertions, 23 deletions
@@ -99,8 +99,6 @@ void hci_req_queue_remove(int dev_id, bdaddr_t *dba); #define HCID_OFFMODE_DEVDOWN 0 #define HCID_OFFMODE_NOSCAN 1 -struct device_opts *alloc_device_opts(char *ref); - uint8_t get_startup_scan(int hdev); uint8_t get_startup_mode(int hdev); int get_discoverable_timeout(int dev_id); @@ -177,27 +177,6 @@ static inline void init_device_defaults(struct device_opts *device_opts) device_opts->discovto = HCID_DEFAULT_DISCOVERABLE_TIMEOUT; } -struct device_opts *alloc_device_opts(char *ref) -{ - struct device_list *device; - - device = g_try_new(struct device_list, 1); - if (!device) { - info("Can't allocate devlist opts buffer: %s (%d)", - strerror(errno), errno); - exit(1); - } - - device->ref = g_strdup(ref); - device->next = device_list; - device_list = device; - - memcpy(&device->opts, &default_device, sizeof(struct device_opts)); - device->opts.name = g_strdup(default_device.name); - - return &device->opts; -} - static void free_device_opts(void) { struct device_list *device, *next; |