Re: [PATCH 1/5] emulator: Fix LE Connection Complete Event data

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

 



Hi Mariusz,

On Thu, Aug 27, 2015, Mariusz Skamra wrote:
> +static void le_conn_complete(struct btdev *btdev, const void *cmd,
> +								uint8_t status)
>  {
>  	char buf[1 + sizeof(struct bt_hci_evt_le_conn_complete)];
>  	struct bt_hci_evt_le_conn_complete *cc = (void *) &buf[1];
> +	const struct bt_hci_cmd_le_create_conn *lecc = cmd;

Why the void pointer in the function parameters and then casting it to
the actual one? It'd be simpler and safer if you just passed this as the
right type from the start.

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