Skip to content

Commit

Permalink
lib/scatterlist: use consistent sg_copy_buffer() return type
Browse files Browse the repository at this point in the history
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]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
ddiss authored and axboe committed Oct 29, 2020
1 parent 24bb45f commit 1f41be7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/scatterlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1f41be7

Please sign in to comment.