[LTP] [PATCH 3/3] lib: Fix wrong field in tst_iovec_alloc

Andrea Cervesato <[email protected]> Fri, 17 Jul 2026 14:33:20 +0200
Newsgroups it.linux.lists.ltp
Message-ID <[email protected]>
From: Andrea Cervesato <[email protected]>

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 <[email protected]>
---
 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


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp