]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove useless checks in rev.13951
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 5 Mar 2015 10:09:39 +0000 (02:09 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 5 Mar 2015 10:09:39 +0000 (02:09 -0800)
Being overly paranoid it seems.

 Detected by Coverity Scan. Issue 1273436

src/tunnel.cc

index 485de198ff47ee947c9cf5b9c44eaa318c9f2e5a..9dfcb7dd8de58ce9981cb9a9192e1ecb14fc1b44 100644 (file)
@@ -696,9 +696,8 @@ tunnelDelayedClientRead(void *data)
 {
     if (!data)
         return;
+
     TunnelStateData *tunnel = static_cast<TunnelStateData*>(data);
-    if (!tunnel)
-        return;
     tunnel->client.readPending = NULL;
     static uint64_t counter=0;
     debugs(26, 7, "Client read(2) delayed " << ++counter << " times");
@@ -710,9 +709,8 @@ tunnelDelayedServerRead(void *data)
 {
     if (!data)
         return;
+
     TunnelStateData *tunnel = static_cast<TunnelStateData*>(data);
-    if (!tunnel)
-        return;
     tunnel->server.readPending = NULL;
     static uint64_t counter=0;
     debugs(26, 7, "Server read(2) delayed " << ++counter << " times");