Skip to content

Commit 1f41be7

Browse files
ddissaxboe
authored andcommitted
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 <ddiss@suse.de> Reviewed-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 24bb45f commit 1f41be7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/scatterlist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
933933
sg_miter_start(&miter, sgl, nents, sg_flags);
934934

935935
if (!sg_miter_skip(&miter, skip))
936-
return false;
936+
return 0;
937937

938938
while ((offset < buflen) && sg_miter_next(&miter)) {
939939
unsigned int len;

0 commit comments

Comments
 (0)