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_tool: fix warning


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=faab5b4212b0e4777648723942cda19cbd192a14
Commit:        faab5b4212b0e4777648723942cda19cbd192a14
Parent:        160d8dea8b9dae39f80cd79f3b716b346d571204
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Mon May 11 13:12:17 2009 -0500
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Mon May 11 13:12:55 2009 -0500

dlm_tool: fix warning

in checking fgets return value

Signed-off-by: David Teigland <teigland@redhat.com>
---
 dlm/tool/main.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/dlm/tool/main.c b/dlm/tool/main.c
index adb136e..bce0a01 100644
--- a/dlm/tool/main.c
+++ b/dlm/tool/main.c
@@ -947,12 +947,8 @@ static void do_lockdump(char *name)
 	}
 
 	/* skip the header on the first line */
-	if(! (rv = fgets(line, LOCK_LINE_MAX, file))) {
-		if (rv) {
-			fprintf(stderr, "can't read %s: %s\n", path, strerror(errno));
-		}
+	if (!fgets(line, LOCK_LINE_MAX, file))
 		return;
-	}
 
 	while (fgets(line, LOCK_LINE_MAX, file)) {
 		rv = sscanf(line, "%x %d %x %u %llu %x %x %hhd %hhd %hhd %u %d %d",


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