X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/2d21ac55c334faf3a56e5634905ed6987fc787d4..0b4c1975fb5e4eccf1012a35081f7e7799b81046:/bsd/kern/subr_sbuf.c diff --git a/bsd/kern/subr_sbuf.c b/bsd/kern/subr_sbuf.c index e966704b8..a3a89c096 100644 --- a/bsd/kern/subr_sbuf.c +++ b/bsd/kern/subr_sbuf.c @@ -208,12 +208,12 @@ sbuf_uionew(struct sbuf *s, struct uio *uio, int *error) KASSERT(error != NULL, ("%s called with NULL error pointer", __func__)); - s = sbuf_new(s, NULL, uio->uio_resid + 1, 0); + s = sbuf_new(s, NULL, uio_resid(uio) + 1, 0); if (s == NULL) { *error = ENOMEM; return (NULL); } - *error = uiomove(s->s_buf, uio->uio_resid, uio); + *error = uiomove(s->s_buf, uio_resid(uio), uio); if (*error != 0) { sbuf_delete(s); return (NULL);