This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: STABLE3 - dlm: don't print an error from lockdump if thereare no locks.


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=d171d1a0d6f1a17b0e6f666c827e00096c0a9ec7
Commit:        d171d1a0d6f1a17b0e6f666c827e00096c0a9ec7
Parent:        e57bd2ee737f3b85b1b8bacf339014afff5b263f
Author:        Christine Caulfield <ccaulfie@redhat.com>
AuthorDate:    Thu May 7 16:25:32 2009 +0100
Committer:     Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Thu May 7 16:25:32 2009 +0100

dlm: don't print an error from lockdump if there are no locks.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
 dlm/tool/main.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlm/tool/main.c b/dlm/tool/main.c
index 631fb56..1011f1e 100644
--- a/dlm/tool/main.c
+++ b/dlm/tool/main.c
@@ -947,8 +947,10 @@ void do_lockdump(char *name)
 	}
 
 	/* skip the header on the first line */
-	if(!fgets(line, LOCK_LINE_MAX, file)) {
-		fprintf(stderr, "can't read %s: %s\n", path, strerror(errno));
+	if(! (rv = fgets(line, LOCK_LINE_MAX, file))) {
+		if (rv) {
+			fprintf(stderr, "can't read %s: %s\n", path, strerror(errno));
+		}
 		return;
 	}
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]