Fixes build warnings about coupled && and || without parentheses
Merge pull request #385 from hean01/master

Fixes build warnings about coupled && and || without parentheses