mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +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:
parent
266f013880
commit
72bd221bb4
@ -159,18 +159,6 @@ POLICY_ITEM policy_item[] =
|
||||
{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
|
||||
void FormatPolicyValue(wchar_t *str, UINT size, UINT id, UINT value)
|
||||
{
|
||||
@ -519,32 +507,6 @@ void SetUserPolicy(USER *u, POLICY *policy)
|
||||
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
|
||||
void SetGroupPolicy(USERGROUP *g, POLICY *policy)
|
||||
{
|
||||
|
@ -295,7 +295,6 @@ POLICY *GetDefaultPolicy();
|
||||
POLICY *ClonePolicy(POLICY *policy);
|
||||
void SetUserPolicy(USER *u, POLICY *policy);
|
||||
void OverwritePolicy(POLICY **target, POLICY *p);
|
||||
POLICY *GetUserPolicy(USER *u);
|
||||
void SetGroupPolicy(USERGROUP *g, POLICY *policy);
|
||||
POLICY *GetGroupPolicy(USERGROUP *g);
|
||||
wchar_t *GetPolicyTitle(UINT id);
|
||||
@ -309,8 +308,6 @@ char *PolicyIdToStr(UINT i);
|
||||
POLICY_ITEM *GetPolicyItem(UINT id);
|
||||
void GetPolicyValueRangeStr(wchar_t *str, UINT size, UINT id);
|
||||
void FormatPolicyValue(wchar_t *str, UINT size, UINT id, UINT value);
|
||||
char *NormalizePolicyName(char *name);
|
||||
|
||||
|
||||
#endif // ACCOUNT_H
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user