mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 13:38:19 +00:00
Don't use xor operator for boolean operations
This commit is contained in:
parent
10f0fffe29
commit
7ec96f25ac
1 changed files with 2 additions and 1 deletions
|
@ -2053,7 +2053,8 @@ bool AssignExpr::TypeCheck(attr_list* attrs)
|
||||||
// the script level.
|
// the script level.
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if ( ((bt1 == TYPE_ENUM) ^ (bt2 == TYPE_ENUM)) )
|
// This should be one of them, but not both (i.e. XOR)
|
||||||
|
if ( (bt1 == TYPE_ENUM) == ! (bt2 == TYPE_ENUM) )
|
||||||
{
|
{
|
||||||
ExprError("can't convert to/from enumerated type");
|
ExprError("can't convert to/from enumerated type");
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue