mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
cppcheck issues:
[src/Cedar/SM.c:875] -> [src/Cedar/SM.c:882]: (warning) Either the condition 'd==0' is redundant or there is possible null pointer dereference: d. [src/Cedar/UdpAccel.c:119] -> [src/Cedar/UdpAccel.c:123]: (warning) Either the condition 'a==0' is redundant or there is possible null pointer dereference: a.
This commit is contained in:
parent
556ea647e3
commit
01edd34bbe
@ -872,7 +872,6 @@ UINT SmDDnsDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param)
|
|||||||
|
|
||||||
// Get the ddns key from the server configuration file
|
// Get the ddns key from the server configuration file
|
||||||
static UINT SmDdnsGetKey(char *key, SM_DDNS *d){
|
static UINT SmDdnsGetKey(char *key, SM_DDNS *d){
|
||||||
RPC *rpc = d->s->Rpc;
|
|
||||||
RPC_CONFIG config;
|
RPC_CONFIG config;
|
||||||
UINT err;
|
UINT err;
|
||||||
BUF *buf;
|
BUF *buf;
|
||||||
@ -882,6 +881,7 @@ static UINT SmDdnsGetKey(char *key, SM_DDNS *d){
|
|||||||
if(d == NULL || d->s == NULL || key == NULL){
|
if(d == NULL || d->s == NULL || key == NULL){
|
||||||
return ERR_INTERNAL_ERROR;
|
return ERR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
RPC *rpc = d->s->Rpc;
|
||||||
|
|
||||||
Zero(&config, sizeof(config));
|
Zero(&config, sizeof(config));
|
||||||
err = ScGetConfig(d->s->Rpc, &config);
|
err = ScGetConfig(d->s->Rpc, &config);
|
||||||
|
@ -116,7 +116,6 @@
|
|||||||
// Polling process
|
// Polling process
|
||||||
void UdpAccelPoll(UDP_ACCEL *a)
|
void UdpAccelPoll(UDP_ACCEL *a)
|
||||||
{
|
{
|
||||||
UCHAR *tmp = a->TmpBuf;
|
|
||||||
IP nat_t_ip;
|
IP nat_t_ip;
|
||||||
UINT num_ignore_errors = 0;
|
UINT num_ignore_errors = 0;
|
||||||
// Validate arguments
|
// Validate arguments
|
||||||
@ -124,6 +123,7 @@ void UdpAccelPoll(UDP_ACCEL *a)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
UCHAR *tmp = a->TmpBuf;
|
||||||
|
|
||||||
Lock(a->NatT_Lock);
|
Lock(a->NatT_Lock);
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user