mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-23 01:49: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,6 +2333,8 @@ void CfgDeleteFolder(FOLDER *f)
|
|||||||
|
|
||||||
// Remove all subfolders
|
// Remove all subfolders
|
||||||
num = LIST_NUM(f->Folders);
|
num = LIST_NUM(f->Folders);
|
||||||
|
if (num != 0)
|
||||||
|
{
|
||||||
ff = Malloc(sizeof(FOLDER *) * num);
|
ff = Malloc(sizeof(FOLDER *) * num);
|
||||||
Copy(ff, f->Folders->p, sizeof(FOLDER *) * num);
|
Copy(ff, f->Folders->p, sizeof(FOLDER *) * num);
|
||||||
for (i = 0;i < num;i++)
|
for (i = 0;i < num;i++)
|
||||||
@ -2340,9 +2342,12 @@ void CfgDeleteFolder(FOLDER *f)
|
|||||||
CfgDeleteFolder(ff[i]);
|
CfgDeleteFolder(ff[i]);
|
||||||
}
|
}
|
||||||
Free(ff);
|
Free(ff);
|
||||||
|
}
|
||||||
|
|
||||||
// Remove all items
|
// Remove all items
|
||||||
num = LIST_NUM(f->Items);
|
num = LIST_NUM(f->Items);
|
||||||
|
if (num != 0)
|
||||||
|
{
|
||||||
tt = Malloc(sizeof(ITEM *) * num);
|
tt = Malloc(sizeof(ITEM *) * num);
|
||||||
Copy(tt, f->Items->p, sizeof(ITEM *) * num);
|
Copy(tt, f->Items->p, sizeof(ITEM *) * num);
|
||||||
for (i = 0;i < num;i++)
|
for (i = 0;i < num;i++)
|
||||||
@ -2350,6 +2355,7 @@ void CfgDeleteFolder(FOLDER *f)
|
|||||||
CfgDeleteItem(tt[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