From d4d97177eb3862f30534fef6d8b43579ee378ce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Mon, 14 Oct 2019 13:23:39 +0000 Subject: [PATCH] Fix test.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- test.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test.c b/test.c index 56d92e8..26d1ab2 100644 --- a/test.c +++ b/test.c @@ -83,11 +83,9 @@ main(int argc, char **argv) } } - size_t len = strlen(argv[1]); - // we can safely call mud_send() // even if the link is not ready - int r = mud_send(mud, argv[1], len, 0); + int r = mud_send(mud, argv[1], strlen(argv[1]), 0); if (r == -1) { if (errno == EAGAIN) @@ -98,7 +96,7 @@ main(int argc, char **argv) } // we sent everything, bye :) - if ((size_t)r == len) + if (r) break; } else { int r = mud_recv(mud, buf, sizeof(buf));