mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-06-28 11:55:08 +03:00
initial fix for clang warnings
This commit is contained in:
parent
16b713b98d
commit
a8cc8a7a90
@ -2406,7 +2406,7 @@ bool MakeLogFileName(LOG *g, char *name, UINT size, char *dir, char *prefix, UIN
|
||||
if (strcmp(old_datestr, tmp) != 0)
|
||||
{
|
||||
ret = true;
|
||||
strcpy(old_datestr, tmp);
|
||||
StrCpy(old_datestr, MAX_SIZE, tmp);
|
||||
}
|
||||
|
||||
snprintf(name, size, "%s%s%s%s%s.log", dir,
|
||||
|
@ -326,7 +326,7 @@ static wchar_t *WpListener(WEBUI *wu, LIST *params)
|
||||
WU_CONTEXT *context = WuGetContext(wu->Contexts, sessionkey);
|
||||
char *cmd = (char*)StrMapSearch(params, "CMD");
|
||||
RPC_LISTENER t;
|
||||
UINT retcode;
|
||||
UINT retcode = ERR_NO_ERROR;
|
||||
|
||||
if(context == NULL)
|
||||
{
|
||||
|
@ -2243,23 +2243,29 @@ void CfgDeleteFolder(FOLDER *f)
|
||||
|
||||
// Remove all subfolders
|
||||
num = LIST_NUM(f->Folders);
|
||||
ff = Malloc(sizeof(FOLDER *) * num);
|
||||
Copy(ff, f->Folders->p, sizeof(FOLDER *) * num);
|
||||
for (i = 0;i < num;i++)
|
||||
if (num != 0)
|
||||
{
|
||||
CfgDeleteFolder(ff[i]);
|
||||
ff = Malloc(sizeof(FOLDER *) * num);
|
||||
Copy(ff, f->Folders->p, sizeof(FOLDER *) * num);
|
||||
for (i = 0;i < num;i++)
|
||||
{
|
||||
CfgDeleteFolder(ff[i]);
|
||||
}
|
||||
Free(ff);
|
||||
}
|
||||
Free(ff);
|
||||
|
||||
// Remove all items
|
||||
num = LIST_NUM(f->Items);
|
||||
tt = Malloc(sizeof(ITEM *) * num);
|
||||
Copy(tt, f->Items->p, sizeof(ITEM *) * num);
|
||||
for (i = 0;i < num;i++)
|
||||
if (num != 0)
|
||||
{
|
||||
CfgDeleteItem(tt[i]);
|
||||
tt = Malloc(sizeof(ITEM *) * num);
|
||||
Copy(tt, f->Items->p, sizeof(ITEM *) * num);
|
||||
for (i = 0;i < num;i++)
|
||||
{
|
||||
CfgDeleteItem(tt[i]);
|
||||
}
|
||||
Free(tt);
|
||||
}
|
||||
Free(tt);
|
||||
|
||||
// Memory release
|
||||
Free(f->Name);
|
||||
|
Loading…
Reference in New Issue
Block a user