public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - dlm: don't print an error from lockdump if there are no locks.
@ 2009-05-07 15:26 Christine Caulfield
  0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2009-05-07 15:26 UTC (permalink / raw)
  To: cluster-cvs-relay

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;
 	}
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-07 15:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-07 15:26 cluster: STABLE3 - dlm: don't print an error from lockdump if there are no locks Christine Caulfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).