diff options
author | Guillem Jover <guillem@hadrons.org> | 2020-02-14 15:01:45 +0100 |
---|---|---|
committer | Guillem Jover <guillem@hadrons.org> | 2020-02-14 15:06:13 +0100 |
commit | 6cf7678decfc58afce28ca9f2afe44510b0c5963 (patch) | |
tree | 9a7fa6500f01901bf131d3853676e043b50935a9 /test | |
parent | 0256e8c631863acba849c5b27313d9932749d69c (diff) | |
download | liburing-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>
Diffstat (limited to 'test')
-rw-r--r-- | test/accept-link.c | 1 |
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; |