HomeFreeBSD

newbus: use ssize_t to match sb's len and size, fix ordering of space check

Description

newbus: use ssize_t to match sb's len and size, fix ordering of space check

Both s_len and s_size are ssize_t, so their differece is also more
properly a ssize_t not a size_t. Also, assert that len is <= size when
we enter. This should always be the case. Ensure that we have that one
byte that we write to the end of the buffer before we do so, though
the error should already be set on the buffer if not, and the only
times we supply 'partial' buffers they should be plenty large.

Reviewed by: cem, jhb (prior version, I did cem's suggestion)
Differential Revsion: https://reviews.freebsd.org/D26752

Details

Provenance
impAuthored on
Parents
rS366655: Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
Branches
Unknown
Tags
Unknown