From 29f93371c3d1917522dc4db074188d9ac2be30f8 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Sat, 30 Apr 2016 00:22:05 +0500 Subject: [PATCH] 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. --- src/Cedar/Connection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cedar/Connection.c b/src/Cedar/Connection.c index ada6ecc2..517096e4 100644 --- a/src/Cedar/Connection.c +++ b/src/Cedar/Connection.c @@ -1030,7 +1030,7 @@ void ConnectionSend(CONNECTION *c, UINT64 now) UINT size; SESSION *s; HUB *hub = NULL; - bool use_qos; + bool use_qos = false; // Validate arguments if (c == NULL) { @@ -1038,11 +1038,11 @@ void ConnectionSend(CONNECTION *c, UINT64 now) } s = c->Session; - use_qos = s->QoS; if (s != NULL) { hub = s->Hub; + use_qos = s->QoS; } // Protocol