FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 11-23-2011, 09:15 AM
"Fabio M. Di Nitto"
 
Default cman: move check of null at beginning

Spotted by Coverity Scan

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

diff --git a/cman/daemon/barrier.c b/cman/daemon/barrier.c
index 7fb3005..37283ba 100644
--- a/cman/daemon/barrier.c
+++ b/cman/daemon/barrier.c
@@ -256,7 +256,7 @@ static int barrier_setattr_enabled(struct cl_barrier *barrier,
int status;

/* Can't disable a barrier */
- if (!arg) {
+ if ((!barrier) || (!arg)) {
return -EINVAL;
}

@@ -285,7 +285,7 @@ static int barrier_setattr_enabled(struct cl_barrier *barrier,
return status;
}
}
- if (barrier && barrier->state == BARRIER_STATE_COMPLETE) {
+ if (barrier->state == BARRIER_STATE_COMPLETE) {
return barrier->endreason;
}
return 0; /* Nothing to propogate */
--
1.7.4.4
 

Thread Tools




All times are GMT. The time now is 04:47 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org