Permalink
Browse files

Fixed a logic error due to missing parens

`==` has higher precedence than `&`, so the expression wasn’t doing
what was intended.
  • Loading branch information...
snej committed Jul 2, 2018
1 parent 1dbe815 commit 195be31ff91d19f76e11346d6a070e31e371379c
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/libnyoci/nyoci-outbound.c
@@ -320,7 +320,7 @@ nyoci_outbound_add_options_up_to_key_(
#if NYOCI_CONF_TRANS_ENABLE_OBSERVING
if ( (self->current_transaction != NULL)
&& (self->current_transaction->flags & NYOCI_TRANSACTION_OBSERVE == NYOCI_TRANSACTION_OBSERVE)
&& ((self->current_transaction->flags & NYOCI_TRANSACTION_OBSERVE) == NYOCI_TRANSACTION_OBSERVE)
&& (self->outbound.last_option_key < COAP_OPTION_OBSERVE)
&& (key > COAP_OPTION_OBSERVE)
) {

0 comments on commit 195be31

Please sign in to comment.