From: Rusty Russell Date: Tue, 1 Mar 2011 00:52:39 +0000 (+1030) Subject: failtest: fix tracepath bug. X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=98ba6e4755c71587feffeacf43f996a22a8e0689 failtest: fix tracepath bug. Aborts on a short write with --tracepath. --- diff --git a/ccan/failtest/failtest.c b/ccan/failtest/failtest.c index 77aea9a7..7d842d80 100644 --- a/ccan/failtest/failtest.c +++ b/ccan/failtest/failtest.c @@ -219,7 +219,7 @@ static void trace_str(const char *str) { ssize_t ret; - while ((ret = write(tracefd, str, strlen(str))) <= 0) { + while ((ret = write(tracefd, str, strlen(str))) > 0) { str += ret; if (!*str) return;