lib/scatterlist: use consistent sg_copy_buffer() return type
Subsystems (2)
PATCH 1/1 lib/scatterlist: use consistent sg_copy_buffer() return type
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 <[email protected]>
Reviewed-by Douglas Gilbert <[email protected]>
--- lib/scatterlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/scatterlist.c +1 -1
@@ -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;
Signature · 1 line
2.26.2
Ping - is there any feedback on this trivial change?
Quoted 22 lines · David Disseldorp
sg_copy_buffer()returns asize_twith the number of bytes copied. Return 0 instead of false if the copy is skipped.Signed-off-by David Disseldorp <[email protected]>Reviewed-by Douglas Gilbert <[email protected]>--- lib/scatterlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/scatterlist.c +1
-1@@ -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;
Looks good,
Reviewed-by Johannes Thumshirn <[email protected]>
Quoted 2 lines · David Disseldorp
sg_copy_buffer()returns asize_twith the number of bytes copied. Return 0 instead of false if the copy is skipped.
I've picked this up, thanks.
Signature · 1 line
Jens Axboe