Re: [PATCH v3 1/8] emulator: add support for checking le scan state

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

 



Hi Jakub,

(sorry for the late review)

On Wed, Sep 02, 2015, Jakub Pawlowski wrote:
> +const bool hciemu_is_master_le_scan_enabled(struct hciemu *hciemu)
> +{
> +	if (!hciemu || !hciemu->master_dev)
> +		return NULL;
> +
> +	return btdev_is_le_scan_enabled(hciemu->master_dev);
> +}
> +
>  bool hciemu_add_master_post_command_hook(struct hciemu *hciemu,
>  			hciemu_command_func_t function, void *user_data)
>  {
> diff --git a/emulator/hciemu.h b/emulator/hciemu.h
> index 41ca3fc..a526d8c 100644
> --- a/emulator/hciemu.h
> +++ b/emulator/hciemu.h
> @@ -53,6 +53,8 @@ uint8_t *hciemu_get_features(struct hciemu *hciemu);
>  const uint8_t *hciemu_get_master_bdaddr(struct hciemu *hciemu);
>  const uint8_t *hciemu_get_client_bdaddr(struct hciemu *hciemu);
>  
> +const bool hciemu_is_master_le_scan_enabled(struct hciemu *hciemu);

The 'const' doesn't make any sense together with 'bool'. With pointers
it means the data behind the pointer is read-only. It also makes the
patch fail to compile:

In file included from tools/mgmt-tester.c:41:0:
./emulator/hciemu.h:56:11: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
 const bool hciemu_is_master_le_scan_enabled(struct hciemu *hciemu);

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