public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - fence_tool: dump only the size of the buffer
@ 2009-03-09 22:01 David Teigland
  0 siblings, 0 replies; only message in thread
From: David Teigland @ 2009-03-09 22:01 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c532b00466cb076b803623245d2825dcbb3ea58c
Commit:        c532b00466cb076b803623245d2825dcbb3ea58c
Parent:        f2c67b07b3ef399c276adf1b9bf7c2b81769bc61
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Mon Mar 9 16:51:21 2009 -0500
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Mon Mar 9 16:57:23 2009 -0500

fence_tool: dump only the size of the buffer

Avoid printing a bunch of \0's from unfilled buffers.

Signed-off-by: David Teigland <teigland@redhat.com>
---
 fence/fence_tool/fence_tool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fence/fence_tool/fence_tool.c b/fence/fence_tool/fence_tool.c
index ce96359..6e37444 100644
--- a/fence/fence_tool/fence_tool.c
+++ b/fence/fence_tool/fence_tool.c
@@ -406,7 +406,7 @@ static void do_dump(void)
 	if (rv < 0)
 		die("can't communicate with fenced");
 
-	do_write(STDOUT_FILENO, buf, sizeof(buf));
+	do_write(STDOUT_FILENO, buf, strlen(buf));
 
 	exit(EXIT_SUCCESS);
 }


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

only message in thread, other threads:[~2009-03-09 22:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-09 22:01 cluster: STABLE3 - fence_tool: dump only the size of the buffer David Teigland

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).