diff mbox series

[1/5] lib/scatterlist: use consistent sg_copy_buffer() return type

Message ID 20201023205723.17880-2-ddiss@suse.de (mailing list archive)
State New, archived
Headers show
Series scsi: target: COMPARE AND WRITE miscompare sense | expand

Commit Message

David Disseldorp Oct. 23, 2020, 8:57 p.m. UTC
sg_copy_buffer() returns a size_t with the number of bytes copied.
Return 0 instead of false if the copy is skipped.

Signed-off-by: David Disseldorp <ddiss@suse.de>
---
 lib/scatterlist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index 9a4992dc8e8c..be8d6f4c1c05 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -933,7 +933,7 @@  size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
 	sg_miter_start(&miter, sgl, nents, sg_flags);
 
 	if (!sg_miter_skip(&miter, skip))
-		return false;
+		return 0;
 
 	while ((offset < buflen) && sg_miter_next(&miter)) {
 		unsigned int len;