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

Andrea Cervesato <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
From: Andrea Cervesato <andrea.cervesato-IBi9RG/[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 <andrea.cervesato-IBi9RG/[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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.