* [PATCH] shared/att: Fix boolean check in handle_notify()
@ 2015-05-29 8:09 Andrei Emeltchenko
2015-05-29 8:39 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 6+ messages in thread
From: Andrei Emeltchenko @ 2015-05-29 8:09 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
ext_signed is boolean and shall be checked with logical op.
---
src/shared/att.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/att.c b/src/shared/att.c
index 053aa47..a3d8f89 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
@@ -733,7 +733,7 @@ static void handle_notify(struct bt_att *att, uint8_t opcode, uint8_t *pdu,
const struct queue_entry *entry;
bool found;
- if (opcode & ATT_OP_SIGNED_MASK & !att->ext_signed) {
+ if (opcode & ATT_OP_SIGNED_MASK && !att->ext_signed) {
if (!handle_signed(att, opcode, pdu, pdu_len))
return;
pdu_len -= BT_ATT_SIGNATURE_LEN;
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] shared/att: Fix boolean check in handle_notify()
2015-05-29 8:09 [PATCH] shared/att: Fix boolean check in handle_notify() Andrei Emeltchenko
@ 2015-05-29 8:39 ` Luiz Augusto von Dentz
2015-05-29 8:53 ` [PATCHv2] " Andrei Emeltchenko
0 siblings, 1 reply; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2015-05-29 8:39 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth@vger.kernel.org
Hi Andrei,
On Fri, May 29, 2015 at 11:09 AM, Andrei Emeltchenko
<Andrei.Emeltchenko.news@gmail.com> wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> ext_signed is boolean and shall be checked with logical op.
> ---
> src/shared/att.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/shared/att.c b/src/shared/att.c
> index 053aa47..a3d8f89 100644
> --- a/src/shared/att.c
> +++ b/src/shared/att.c
> @@ -733,7 +733,7 @@ static void handle_notify(struct bt_att *att, uint8_t opcode, uint8_t *pdu,
> const struct queue_entry *entry;
> bool found;
>
> - if (opcode & ATT_OP_SIGNED_MASK & !att->ext_signed) {
> + if (opcode & ATT_OP_SIGNED_MASK && !att->ext_signed) {
I guess adding (opcode & ATT_OP_SIGNED_MASK) would make this even more clearer.
> if (!handle_signed(att, opcode, pdu, pdu_len))
> return;
> pdu_len -= BT_ATT_SIGNATURE_LEN;
> --
> 2.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCHv2] shared/att: Fix boolean check in handle_notify()
2015-05-29 8:39 ` Luiz Augusto von Dentz
@ 2015-05-29 8:53 ` Andrei Emeltchenko
2015-06-01 10:11 ` Andrei Emeltchenko
0 siblings, 1 reply; 6+ messages in thread
From: Andrei Emeltchenko @ 2015-05-29 8:53 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
ext_signed is boolean and shall be checked with logical op.
---
src/shared/att.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/att.c b/src/shared/att.c
index 053aa47..f9a5817 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
@@ -733,7 +733,7 @@ static void handle_notify(struct bt_att *att, uint8_t opcode, uint8_t *pdu,
const struct queue_entry *entry;
bool found;
- if (opcode & ATT_OP_SIGNED_MASK & !att->ext_signed) {
+ if ((opcode & ATT_OP_SIGNED_MASK) && !att->ext_signed) {
if (!handle_signed(att, opcode, pdu, pdu_len))
return;
pdu_len -= BT_ATT_SIGNATURE_LEN;
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCHv2] shared/att: Fix boolean check in handle_notify()
2015-05-29 8:53 ` [PATCHv2] " Andrei Emeltchenko
@ 2015-06-01 10:11 ` Andrei Emeltchenko
2015-06-05 13:00 ` Andrei Emeltchenko
0 siblings, 1 reply; 6+ messages in thread
From: Andrei Emeltchenko @ 2015-06-01 10:11 UTC (permalink / raw)
To: linux-bluetooth
ping
On Fri, May 29, 2015 at 11:53:26AM +0300, Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> ext_signed is boolean and shall be checked with logical op.
> ---
> src/shared/att.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/shared/att.c b/src/shared/att.c
> index 053aa47..f9a5817 100644
> --- a/src/shared/att.c
> +++ b/src/shared/att.c
> @@ -733,7 +733,7 @@ static void handle_notify(struct bt_att *att, uint8_t opcode, uint8_t *pdu,
> const struct queue_entry *entry;
> bool found;
>
> - if (opcode & ATT_OP_SIGNED_MASK & !att->ext_signed) {
> + if ((opcode & ATT_OP_SIGNED_MASK) && !att->ext_signed) {
> if (!handle_signed(att, opcode, pdu, pdu_len))
> return;
> pdu_len -= BT_ATT_SIGNATURE_LEN;
> --
> 2.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCHv2] shared/att: Fix boolean check in handle_notify()
2015-06-01 10:11 ` Andrei Emeltchenko
@ 2015-06-05 13:00 ` Andrei Emeltchenko
2015-06-05 14:41 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 6+ messages in thread
From: Andrei Emeltchenko @ 2015-06-05 13:00 UTC (permalink / raw)
To: linux-bluetooth
ping
On Mon, Jun 01, 2015 at 01:11:43PM +0300, Andrei Emeltchenko wrote:
> ping
>
> On Fri, May 29, 2015 at 11:53:26AM +0300, Andrei Emeltchenko wrote:
> > From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> >
> > ext_signed is boolean and shall be checked with logical op.
> > ---
> > src/shared/att.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/shared/att.c b/src/shared/att.c
> > index 053aa47..f9a5817 100644
> > --- a/src/shared/att.c
> > +++ b/src/shared/att.c
> > @@ -733,7 +733,7 @@ static void handle_notify(struct bt_att *att, uint8_t opcode, uint8_t *pdu,
> > const struct queue_entry *entry;
> > bool found;
> >
> > - if (opcode & ATT_OP_SIGNED_MASK & !att->ext_signed) {
> > + if ((opcode & ATT_OP_SIGNED_MASK) && !att->ext_signed) {
> > if (!handle_signed(att, opcode, pdu, pdu_len))
> > return;
> > pdu_len -= BT_ATT_SIGNATURE_LEN;
> > --
> > 2.1.4
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCHv2] shared/att: Fix boolean check in handle_notify()
2015-06-05 13:00 ` Andrei Emeltchenko
@ 2015-06-05 14:41 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2015-06-05 14:41 UTC (permalink / raw)
To: Andrei Emeltchenko, linux-bluetooth@vger.kernel.org
Hi Andrei,
On Fri, Jun 5, 2015 at 4:00 PM, Andrei Emeltchenko
<Andrei.Emeltchenko.news@gmail.com> wrote:
> ping
>
> On Mon, Jun 01, 2015 at 01:11:43PM +0300, Andrei Emeltchenko wrote:
>> ping
>>
>> On Fri, May 29, 2015 at 11:53:26AM +0300, Andrei Emeltchenko wrote:
>> > From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>> >
>> > ext_signed is boolean and shall be checked with logical op.
>> > ---
>> > src/shared/att.c | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/src/shared/att.c b/src/shared/att.c
>> > index 053aa47..f9a5817 100644
>> > --- a/src/shared/att.c
>> > +++ b/src/shared/att.c
>> > @@ -733,7 +733,7 @@ static void handle_notify(struct bt_att *att, uint8_t opcode, uint8_t *pdu,
>> > const struct queue_entry *entry;
>> > bool found;
>> >
>> > - if (opcode & ATT_OP_SIGNED_MASK & !att->ext_signed) {
>> > + if ((opcode & ATT_OP_SIGNED_MASK) && !att->ext_signed) {
>> > if (!handle_signed(att, opcode, pdu, pdu_len))
>> > return;
>> > pdu_len -= BT_ATT_SIGNATURE_LEN;
>> > --
>> > 2.1.4
>> >
>> > --
>> > To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>> > the body of a message to majordomo@vger.kernel.org
>> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
Applied, thanks.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-06-05 14:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-29 8:09 [PATCH] shared/att: Fix boolean check in handle_notify() Andrei Emeltchenko
2015-05-29 8:39 ` Luiz Augusto von Dentz
2015-05-29 8:53 ` [PATCHv2] " Andrei Emeltchenko
2015-06-01 10:11 ` Andrei Emeltchenko
2015-06-05 13:00 ` Andrei Emeltchenko
2015-06-05 14:41 ` Luiz Augusto von Dentz
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.