mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-05 00:00:45 -04:00
vici: Remove unreachable code
If list is TRUE any type but VICI_LIST_END and VICI_LIST_ITEM (i.e. including VICI_END) is already handled in the first block in this function.
This commit is contained in:
parent
954e75effa
commit
a0c302f878
@ -102,18 +102,10 @@ bool vici_verify_type(vici_type_t type, u_int section, bool list)
|
||||
DBG1(DBG_ENC, "'%N' outside of section", vici_type_names, type);
|
||||
return FALSE;
|
||||
}
|
||||
if (type == VICI_END)
|
||||
if (type == VICI_END && section)
|
||||
{
|
||||
if (section)
|
||||
{
|
||||
DBG1(DBG_ENC, "'%N' within section", vici_type_names, type);
|
||||
return FALSE;
|
||||
}
|
||||
if (list)
|
||||
{
|
||||
DBG1(DBG_ENC, "'%N' within list", vici_type_names, type);
|
||||
return FALSE;
|
||||
}
|
||||
DBG1(DBG_ENC, "'%N' within section", vici_type_names, type);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user