In a legacy code, I have encountered the following expression:
if (!m_bMsOcs && bChannelData || m_bMsOcs && !bStunType)
I guess the intended condition was
if ((!m_bMsOcs && bChannelData) || (m_bMsOcs && !bStunType))
I am not sure. How is the original conditional expression supposed to execute? Please help.
The precedence of logical operators is:
so your guess is correct.