mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 09:29:52 +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)
|
||||
{
|
||||
ret = true;
|
||||
strcpy(old_datestr, tmp);
|
||||
StrCpy(old_datestr, MAX_SIZE, tmp);
|
||||
}
|
||||
|
||||
snprintf(name, size, "%s%s%s%s%s.log", dir,
|
||||
|
@ -2333,23 +2333,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