mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-08 00:34:57 +03:00
cppcheck issues:
[src/Cedar/WebUI.c:1728] -> [src/Cedar/WebUI.c:1730]: (warning) Either the condition 'buf==0' is redundant or there is possible null pointer dereference: buf. [src/Mayaqua/FileIO.c:383] -> [src/Mayaqua/FileIO.c:386]: (warning) Either the condition 'p==0' is redundant or there is possible null pointer dereference: p. [src/Mayaqua/TcpIp.c:1837] -> [src/Mayaqua/TcpIp.c:1839]: (warning) Either the condition 'tcp!=0' is redundant or there is possible null pointer dereference: tcp.
This commit is contained in:
@ -380,13 +380,13 @@ void ZipAddFileStart(ZIP_PACKER *p, char *name, UINT size, UINT64 dt, UINT attri
|
||||
// Add data to the file
|
||||
UINT ZipAddFileData(ZIP_PACKER *p, void *data, UINT pos, UINT len)
|
||||
{
|
||||
UINT total_size = p->CurrentFile->CurrentSize + len;
|
||||
UINT ret;
|
||||
// Validate arguments
|
||||
if (p == NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
UINT total_size = p->CurrentFile->CurrentSize + len;
|
||||
if (total_size > p->CurrentFile->Size)
|
||||
{
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user