1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-09-19 18:20:40 +03:00

src/Cedar/Account: remove unused functions

found by cppcheck

[src/Cedar/Account.c:523]: (style) The function 'GetUserPolicy' is never used.
[src/Cedar/Account.c:163]: (style) The function 'NormalizePolicyName' is never used.
This commit is contained in:
Ilya Shipitsin 2019-01-06 18:53:18 +05:00
parent 266f013880
commit 72bd221bb4
2 changed files with 0 additions and 41 deletions

View File

@ -159,18 +159,6 @@ POLICY_ITEM policy_item[] =
{37, true, true, 1, 4095, 0, "POL_INT_VLAN"}, // VLanId {37, true, true, 1, 4095, 0, "POL_INT_VLAN"}, // VLanId
}; };
// Normalize policy name
char *NormalizePolicyName(char *name)
{
// Validate arguments
if (name == NULL)
{
return NULL;
}
return PolicyIdToStr(PolicyStrToId(name));
}
// Format policy value // Format policy value
void FormatPolicyValue(wchar_t *str, UINT size, UINT id, UINT value) void FormatPolicyValue(wchar_t *str, UINT size, UINT id, UINT value)
{ {
@ -519,32 +507,6 @@ void SetUserPolicy(USER *u, POLICY *policy)
Unlock(u->lock); Unlock(u->lock);
} }
// Get user policy
POLICY *GetUserPolicy(USER *u)
{
POLICY *ret;
// Validate arguments
if (u == NULL)
{
return NULL;
}
Lock(u->lock);
{
if (u->Policy == NULL)
{
ret = NULL;
}
else
{
ret = ClonePolicy(u->Policy);
}
}
Unlock(u->lock);
return ret;
}
// Set group policy // Set group policy
void SetGroupPolicy(USERGROUP *g, POLICY *policy) void SetGroupPolicy(USERGROUP *g, POLICY *policy)
{ {

View File

@ -295,7 +295,6 @@ POLICY *GetDefaultPolicy();
POLICY *ClonePolicy(POLICY *policy); POLICY *ClonePolicy(POLICY *policy);
void SetUserPolicy(USER *u, POLICY *policy); void SetUserPolicy(USER *u, POLICY *policy);
void OverwritePolicy(POLICY **target, POLICY *p); void OverwritePolicy(POLICY **target, POLICY *p);
POLICY *GetUserPolicy(USER *u);
void SetGroupPolicy(USERGROUP *g, POLICY *policy); void SetGroupPolicy(USERGROUP *g, POLICY *policy);
POLICY *GetGroupPolicy(USERGROUP *g); POLICY *GetGroupPolicy(USERGROUP *g);
wchar_t *GetPolicyTitle(UINT id); wchar_t *GetPolicyTitle(UINT id);
@ -309,8 +308,6 @@ char *PolicyIdToStr(UINT i);
POLICY_ITEM *GetPolicyItem(UINT id); POLICY_ITEM *GetPolicyItem(UINT id);
void GetPolicyValueRangeStr(wchar_t *str, UINT size, UINT id); void GetPolicyValueRangeStr(wchar_t *str, UINT size, UINT id);
void FormatPolicyValue(wchar_t *str, UINT size, UINT id, UINT value); void FormatPolicyValue(wchar_t *str, UINT size, UINT id, UINT value);
char *NormalizePolicyName(char *name);
#endif // ACCOUNT_H #endif // ACCOUNT_H