[LTP] [PATCH 3/3] lib: Fix wrong field in tst_iovec_alloc
Andrea Cervesato
andrea.cervesato@suse.de
Fri Jul 17 14:33:20 CEST 2026
From: Andrea Cervesato <andrea.cervesato@suse.com>
The zero-size branch assigned iov_base twice and left iov_len unset,
clearly a copy-paste typo. Set iov_len to 0 as intended.
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
lib/tst_buffers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tst_buffers.c b/lib/tst_buffers.c
index ac76a784bb7060ad46815310b56b2a4229bfd395..048b322457c3173df61e0617ad0bc190581c78a7 100644
--- a/lib/tst_buffers.c
+++ b/lib/tst_buffers.c
@@ -123,7 +123,7 @@ struct iovec *tst_iovec_alloc(int sizes[])
iovec[i].iov_len = sizes[i];
} else {
iovec[i].iov_base = NULL;
- iovec[i].iov_base = 0;
+ iovec[i].iov_len = 0;
}
}
--
2.51.0
More information about the ltp
mailing list