public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* fence: master - 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/fence.git?p=fence.git;a=commitdiff;h=5300fc8e07c2297e295c4f7ebd9996fa1f064558
Commit: 5300fc8e07c2297e295c4f7ebd9996fa1f064558
Parent: 36cf04edd383fd8018c9fca515ed44c2d1f96399
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:52 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 74824c2..8ee5544 100644
--- a/fence/fence_tool/fence_tool.c
+++ b/fence/fence_tool/fence_tool.c
@@ -421,7 +421,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 fence: master - 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).