1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-23 01:49:53 +03:00

cppcheck issue:

[src/Cedar/Connection.c:1041] -> [src/Cedar/Connection.c:1043]: (warning) Either the condition 's!=0' is redundant or there is possible null pointer dereference: s.
This commit is contained in:
Ilya Shipitsin 2016-04-30 00:22:05 +05:00
parent 01edd34bbe
commit 29f93371c3

View File

@ -1030,7 +1030,7 @@ void ConnectionSend(CONNECTION *c, UINT64 now)
UINT size; UINT size;
SESSION *s; SESSION *s;
HUB *hub = NULL; HUB *hub = NULL;
bool use_qos; bool use_qos = false;
// Validate arguments // Validate arguments
if (c == NULL) if (c == NULL)
{ {
@ -1038,11 +1038,11 @@ void ConnectionSend(CONNECTION *c, UINT64 now)
} }
s = c->Session; s = c->Session;
use_qos = s->QoS;
if (s != NULL) if (s != NULL)
{ {
hub = s->Hub; hub = s->Hub;
use_qos = s->QoS;
} }
// Protocol // Protocol