Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Cluster Development (http://www.linux-archive.org/cluster-development/)
-   -   cman: drop dead code and fix code logic (http://www.linux-archive.org/cluster-development/601620-cman-drop-dead-code-fix-code-logic.html)

"Fabio M. Di Nitto" 11-23-2011 09:15 AM

cman: drop dead code and fix code logic
 
Spotted by Coverity Scan

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
:100644 100644 f4362cf... 7fb3005... M cman/daemon/barrier.c
cman/daemon/barrier.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/cman/daemon/barrier.c b/cman/daemon/barrier.c
index f4362cf..7fb3005 100644
--- a/cman/daemon/barrier.c
+++ b/cman/daemon/barrier.c
@@ -177,11 +177,11 @@ void process_barrier_msg(struct cl_barriermsg *msg,
{
struct cl_barrier *barrier;

- barrier = find_barrier(msg->name);
-
/* Ignore other peoples' messages */
if (!we_are_a_cluster_member)
return;
+
+ barrier = find_barrier(msg->name);
if (!barrier)
return;

@@ -200,8 +200,6 @@ void process_barrier_msg(struct cl_barriermsg *msg,
break;

case BARRIER_COMPLETE:
- if (!barrier)
- return;
/* Once we receive COMPLETE, we know that everyone has completed.
I love VS */
barrier_complete_phase2(barrier, 0);
--
1.7.4.4


All times are GMT. The time now is 09:46 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.