From 64f3bef96da548bc5e13112dbd090b064d940d03 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Wed, 25 Sep 2013 13:37:46 -0500 Subject: [PATCH] Remove logically dead code. --- src/RemoteSerializer.cc | 2 +- src/Val.cc | 2 +- src/analyzer/protocol/ayiya/ayiya-analyzer.pac | 2 +- src/input/Manager.cc | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/RemoteSerializer.cc b/src/RemoteSerializer.cc index bc006b4b1f..e36686b487 100644 --- a/src/RemoteSerializer.cc +++ b/src/RemoteSerializer.cc @@ -1247,7 +1247,7 @@ bool RemoteSerializer::SendCapabilities(Peer* peer) caps |= Peer::PID_64BIT; caps |= Peer::NEW_CACHE_STRATEGY; - return caps ? SendToChild(MSG_CAPS, peer, 3, caps, 0, 0) : true; + return SendToChild(MSG_CAPS, peer, 3, caps, 0, 0); } bool RemoteSerializer::Listen(const IPAddr& ip, uint16 port, bool expect_ssl, diff --git a/src/Val.cc b/src/Val.cc index ffe98ab7bc..bd065f0d8f 100644 --- a/src/Val.cc +++ b/src/Val.cc @@ -2162,7 +2162,7 @@ void TableVal::DoExpire(double t) else if ( v->ExpireAccessTime() + expire_time < t ) { - Val* val = v ? v->Value() : 0; + Val* val = v->Value(); if ( expire_expr ) { diff --git a/src/analyzer/protocol/ayiya/ayiya-analyzer.pac b/src/analyzer/protocol/ayiya/ayiya-analyzer.pac index 7a151453c1..56fcc794bc 100644 --- a/src/analyzer/protocol/ayiya/ayiya-analyzer.pac +++ b/src/analyzer/protocol/ayiya/ayiya-analyzer.pac @@ -79,7 +79,7 @@ flow AYIYA_Flow sessions->DoNextInnerPacket(network_time(), 0, inner, e, ec); - return (result == 0) ? true : false; + return true; %} }; diff --git a/src/input/Manager.cc b/src/input/Manager.cc index d739a96809..f76ab67f0d 100644 --- a/src/input/Manager.cc +++ b/src/input/Manager.cc @@ -1153,7 +1153,6 @@ int Manager::SendEntryTable(Stream* i, const Value* const *vals) { // just quit and delete everything we created. delete idxhash; - delete h; return stream->num_val_fields + stream->num_idx_fields; }