Re: [PATCH 5/5] Extended support for generating dictionary value of service UUIDs

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

 



Hi Inga,

>  src/adapter.c  |   95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
>  src/adapter.h  |    4 +-
>  src/dbus-hci.c |    6 ++--
>  3 files changed, 97 insertions(+), 8 deletions(-)
> 
> diff --git a/src/adapter.c b/src/adapter.c
> index b22b086..612c3a9 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -2763,8 +2763,84 @@ static void emit_device_found(const char *path, const char *address,
>  	g_dbus_send_message(connection, signal);
>  }
>  
> +static int get_uuid_count_eir (uint8_t *eir_data)
> +{

please get the coding style right. It is count_eir(uint8 ...)

> +	uint8_t len = 0;
> +	int count = 0;
> +
> +	while (len < EIR_DATA_LENGTH) {
> +		uint8_t type = eir_data[1];
> +		uint8_t field_len = eir_data[0];
> +		if ((type == EIR_UUID16_SOME) || (type == EIR_UUID16_ALL))
> +			count += field_len/2;

The double ( ) is not needed. So if (type == ... || type == ...). That
is enough actually.

Regards

Marcel


--
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