New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a logic error due to missing parens #16

Merged
merged 1 commit into from Jul 7, 2018

Conversation

Projects
None yet
2 participants
@snej
Contributor

snej commented Jul 6, 2018

== has higher precedence than &, so the expression wasn’t doing what was intended.

This was caught by GCC's -Wparentheses:

libnyoci/src/libnyoci/nyoci-outbound.c:323:41: error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses]
    && (self->current_transaction->flags & NYOCI_TRANSACTION_OBSERVE == NYOCI_TRANSACTION_OBSERVE)
                                         ^
Fixed a logic error due to missing parens
`==` has higher precedence than `&`, so the expression wasn’t doing
what was intended.

@darconeous darconeous merged commit 6527b50 into darconeous:master Jul 7, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment