All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Inga Stotland <ingas@codeaurora.org>
Cc: linux-bluetooth@vger.kernel.org, rshaffer@codeaurora.org,
	johan.hedberg@gmail.com
Subject: Re: [PATCH 5/5] Extended support for generating dictionary value of service UUIDs
Date: Wed, 21 Jul 2010 01:46:24 -0700	[thread overview]
Message-ID: <1279701984.3035.2.camel@localhost.localdomain> (raw)
In-Reply-To: <1279662974-16454-6-git-send-email-ingas@codeaurora.org>

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



  reply	other threads:[~2010-07-21  8:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20 21:56 [PATCH v3 0/5] Enhanced support for extended inquiry response Inga Stotland
2010-07-20 21:56 ` [PATCH 1/5] Spec constants for Extended Inqiory Response field types Inga Stotland
2010-07-21  8:43   ` Marcel Holtmann
2010-07-20 21:56 ` [PATCH 2/5] Support for adding UUID128 to extended inquiry response Inga Stotland
2010-07-20 21:56 ` [PATCH 3/5] Update EIR whenever record is added or removed Inga Stotland
2010-07-20 21:56 ` [PATCH 4/5] Handle arrays in device properties dictionary Inga Stotland
2010-07-20 21:56 ` [PATCH 5/5] Extended support for generating dictionary value of service UUIDs Inga Stotland
2010-07-21  8:46   ` Marcel Holtmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-07-22 16:06 [PATCH v4 0/5] Enhanced support for extended inquiry response Inga Stotland
2010-07-22 16:06 ` [PATCH 5/5] Extended support for generating dictionary value of service UUIDs Inga Stotland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1279701984.3035.2.camel@localhost.localdomain \
    --to=marcel@holtmann.org \
    --cc=ingas@codeaurora.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=rshaffer@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.