1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-23 01:49:53 +03:00

src/Cedar/Admin.c: remove reccuring check

found by PVS analyzer

src/Cedar/Admin.c	5583	err	V571 Recurring check. The 'if (no_include)' condition was already verified in line 5581.
This commit is contained in:
Ilya Shipitsin 2018-11-04 01:02:51 +05:00
parent 87702f0f7d
commit dcc684ea28

View File

@ -5580,19 +5580,16 @@ UINT StAddAccess(ADMIN *a, RPC_ADD_ACCESS *t)
if (no_include) if (no_include)
{ {
if (no_include) if (StartWith(t->Access.SrcUsername, ACCESS_LIST_INCLUDED_PREFIX) ||
StartWith(t->Access.SrcUsername, ACCESS_LIST_EXCLUDED_PREFIX))
{ {
if (StartWith(t->Access.SrcUsername, ACCESS_LIST_INCLUDED_PREFIX) || ClearStr(t->Access.SrcUsername, sizeof(t->Access.SrcUsername));
StartWith(t->Access.SrcUsername, ACCESS_LIST_EXCLUDED_PREFIX)) }
{
ClearStr(t->Access.SrcUsername, sizeof(t->Access.SrcUsername));
}
if (StartWith(t->Access.DestUsername, ACCESS_LIST_INCLUDED_PREFIX) || if (StartWith(t->Access.DestUsername, ACCESS_LIST_INCLUDED_PREFIX) ||
StartWith(t->Access.DestUsername, ACCESS_LIST_EXCLUDED_PREFIX)) StartWith(t->Access.DestUsername, ACCESS_LIST_EXCLUDED_PREFIX))
{ {
ClearStr(t->Access.DestUsername, sizeof(t->Access.DestUsername)); ClearStr(t->Access.DestUsername, sizeof(t->Access.DestUsername));
}
} }
} }