diff options
| author | Johan Hedberg <johan.hedberg@nokia.com> | 2006-03-28 11:23:04 +0000 | 
|---|---|---|
| committer | Johan Hedberg <johan.hedberg@nokia.com> | 2006-03-28 11:23:04 +0000 | 
| commit | 55defb8c158bce4194436aee491ae731cce30af2 (patch) | |
| tree | 40c59a5fa7d99c5d46c486b76d5495a4ac6345ff /hcid/security.c | |
| parent | 2b285a2aca9a59da658ff694883affe0e5201a23 (diff) | |
Cleanup
Diffstat (limited to 'hcid/security.c')
| -rw-r--r-- | hcid/security.c | 18 | 
1 files changed, 9 insertions, 9 deletions
| diff --git a/hcid/security.c b/hcid/security.c index d2d7ac1e..dabbded0 100644 --- a/hcid/security.c +++ b/hcid/security.c @@ -111,6 +111,7 @@ static int hci_req_find_by_dev(const void *data, const void *user_data)  static int check_pending_hci_req(int dev)  { +	struct hci_req_data *data;  	struct slist *l;  	if (!hci_req_queue) @@ -118,20 +119,19 @@ static int check_pending_hci_req(int dev)  	l = slist_find(hci_req_queue, &dev, hci_req_find_by_dev); -	if (l) { -		struct hci_req_data *data = l->data; +	if (!l) +		return -1; -		hci_send_cmd(dev, data->ogf, data->ocf, data->clen, data->cparam); +	data = l->data; -		hci_req_queue = slist_remove(hci_req_queue, data); +	hci_send_cmd(dev, data->ogf, data->ocf, data->clen, data->cparam); -		free(data->cparam); -		free(data); +	hci_req_queue = slist_remove(hci_req_queue, data); -		return 0; -	} +	free(data->cparam); +	free(data); -	return -1; +	return 0;  }  static inline int get_bdaddr(int dev, bdaddr_t *sba, uint16_t handle, bdaddr_t *dba) | 
