MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cuio_contiguous_segment

Function cuio_contiguous_segment

freebsd/opencrypto/criov.c:721–736  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

719}
720
721static inline void *
722cuio_contiguous_segment(struct uio *uio, size_t skip, size_t len)
723{
724 int rel_off, idx;
725
726 MPASS(skip <= INT_MAX);
727 idx = cuio_getptr(uio, (int)skip, &rel_off);
728 if (idx < 0)
729 return (NULL);
730
731 MPASS(rel_off >= 0);
732 skip = rel_off;
733 if (skip + len > uio->uio_iov[idx].iov_len)
734 return (NULL);
735 return ((char *)uio->uio_iov[idx].iov_base + skip);
736}
737
738void *
739crypto_buffer_contiguous_subsegment(struct crypto_buffer *cb, size_t skip,

Callers 1

Calls 1

cuio_getptrFunction · 0.85

Tested by

no test coverage detected