X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/974e388456677d82eb6d10d4fd72390641a5bdfe..6dccf0e0b5e80b7b6176e8d332e646175431bb3d:/stdio/FreeBSD/getdelim.c diff --git a/stdio/FreeBSD/getdelim.c b/stdio/FreeBSD/getdelim.c index 02ff26d..705231a 100644 --- a/stdio/FreeBSD/getdelim.c +++ b/stdio/FreeBSD/getdelim.c @@ -142,7 +142,7 @@ getdelim(char ** __restrict linep, size_t * __restrict linecapp, int delim, linelen = 0; while ((endp = memchr(fp->_p, delim, fp->_r)) == NULL) { - if (sappend(linep, &linelen, linecapp, fp->_p, fp->_r)) + if (sappend(linep, &linelen, linecapp, (char*)fp->_p, fp->_r)) goto error; if (__srefill(fp)) { if (__sferror(fp)) @@ -151,7 +151,7 @@ getdelim(char ** __restrict linep, size_t * __restrict linecapp, int delim, } } endp++; /* snarf the delimiter, too */ - if (sappend(linep, &linelen, linecapp, fp->_p, endp - fp->_p)) + if (sappend(linep, &linelen, linecapp, (char*)fp->_p, endp - fp->_p)) goto error; fp->_r -= endp - fp->_p; fp->_p = endp;