summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2020-02-14 15:01:45 +0100
committerGuillem Jover <guillem@hadrons.org>2020-02-14 15:06:13 +0100
commit6cf7678decfc58afce28ca9f2afe44510b0c5963 (patch)
tree9a7fa6500f01901bf131d3853676e043b50935a9
parent0256e8c631863acba849c5b27313d9932749d69c (diff)
downloadliburing-6cf7678decfc58afce28ca9f2afe44510b0c5963.tar.gz
liburing-6cf7678decfc58afce28ca9f2afe44510b0c5963.tar.bz2
test: Initialize the data struct to set stop member to 0
The send_thread() will do an early return if the stop member is true, which can happen in case we do not initialize the memory. Otherwise we will then get a failure with -EALREADY instead of the expected -ECANCELED. Signed-off-by: Guillem Jover <guillem@hadrons.org>
-rw-r--r--test/accept-link.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/accept-link.c b/test/accept-link.c
index dba720a..a6c2aef 100644
--- a/test/accept-link.c
+++ b/test/accept-link.c
@@ -176,6 +176,7 @@ static int test_accept_timeout(int do_connect, unsigned long timeout)
recv_thread_ready = 0;
recv_thread_done = 0;
+ memset(&d, 0, sizeof(d));
d.timeout = timeout;
if (!do_connect) {
d.expected[0] = -EINTR;