Fix some logical-not-parentheses warnings thrown by clang 5.1