mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
initial fix for clang warnings (#84)
This commit is contained in:
parent
323851607c
commit
8ddd328762
@ -2550,7 +2550,7 @@ bool MakeLogFileName(LOG *g, char *name, UINT size, char *dir, char *prefix, UIN
|
|||||||
if (strcmp(old_datestr, tmp) != 0)
|
if (strcmp(old_datestr, tmp) != 0)
|
||||||
{
|
{
|
||||||
ret = true;
|
ret = true;
|
||||||
strcpy(old_datestr, tmp);
|
StrCpy(old_datestr, MAX_SIZE, tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(name, size, "%s%s%s%s%s.log", dir,
|
snprintf(name, size, "%s%s%s%s%s.log", dir,
|
||||||
|
@ -2333,23 +2333,29 @@ void CfgDeleteFolder(FOLDER *f)
|
|||||||
|
|
||||||
// Remove all subfolders
|
// Remove all subfolders
|
||||||
num = LIST_NUM(f->Folders);
|
num = LIST_NUM(f->Folders);
|
||||||
ff = Malloc(sizeof(FOLDER *) * num);
|
if (num != 0)
|
||||||
Copy(ff, f->Folders->p, sizeof(FOLDER *) * num);
|
|
||||||
for (i = 0;i < num;i++)
|
|
||||||
{
|
{
|
||||||
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
|
// Remove all items
|
||||||
num = LIST_NUM(f->Items);
|
num = LIST_NUM(f->Items);
|
||||||
tt = Malloc(sizeof(ITEM *) * num);
|
if (num != 0)
|
||||||
Copy(tt, f->Items->p, sizeof(ITEM *) * num);
|
|
||||||
for (i = 0;i < num;i++)
|
|
||||||
{
|
{
|
||||||
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
|
// Memory release
|
||||||
Free(f->Name);
|
Free(f->Name);
|
||||||
|
Loading…
Reference in New Issue
Block a user