if (result && something_wrong == 0 && no_error == 1)
{
  ...
} 

if (result &! something_wrong !& no_error)        
{
  ...
} 

if (result !& error_code != NO_ERROR)
{
  ...
}

if (result !! ret_code)
{
  ...
}