diff options
author | Ilya Shipitsin <chipitsine@gmail.com> | 2016-04-29 22:16:15 +0300 |
---|---|---|
committer | Ilya Shipitsin <chipitsine@gmail.com> | 2016-04-29 22:16:15 +0300 |
commit | 01edd34bbe22f8500cb539102cbdbc143c197600 (patch) | |
tree | cd3dc5d26b7245161d23a20bef19bbbc9179a49a | |
parent | 556ea647e346b0f30c0f79e7117566c4d58d55b0 (diff) |
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.
-rw-r--r-- | src/Cedar/SM.c | 2 | ||||
-rw-r--r-- | src/Cedar/UdpAccel.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Cedar/SM.c b/src/Cedar/SM.c index a45213b4..92471e24 100644 --- a/src/Cedar/SM.c +++ b/src/Cedar/SM.c @@ -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
static UINT SmDdnsGetKey(char *key, SM_DDNS *d){
- RPC *rpc = d->s->Rpc;
RPC_CONFIG config;
UINT err;
BUF *buf;
@@ -882,6 +881,7 @@ static UINT SmDdnsGetKey(char *key, SM_DDNS *d){ if(d == NULL || d->s == NULL || key == NULL){
return ERR_INTERNAL_ERROR;
}
+ RPC *rpc = d->s->Rpc;
Zero(&config, sizeof(config));
err = ScGetConfig(d->s->Rpc, &config);
diff --git a/src/Cedar/UdpAccel.c b/src/Cedar/UdpAccel.c index 8b5b595f..58d1a621 100644 --- a/src/Cedar/UdpAccel.c +++ b/src/Cedar/UdpAccel.c @@ -116,7 +116,6 @@ // Polling process
void UdpAccelPoll(UDP_ACCEL *a)
{
- UCHAR *tmp = a->TmpBuf;
IP nat_t_ip;
UINT num_ignore_errors = 0;
// Validate arguments
@@ -124,6 +123,7 @@ void UdpAccelPoll(UDP_ACCEL *a) {
return;
}
+ UCHAR *tmp = a->TmpBuf;
Lock(a->NatT_Lock);
{
|