commit 5ac3a0d4c1a9d7e4d3912c4770084b885007aca6
parent 560a156341e5bb352194a85c3258406a079697b7
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 2 Jul 2022 00:00:37 +0200
libc: Fix pointer types in setvbuf()
Pointers with different signess cannot be assigned.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libc/stdio/setvbuf.c b/src/libc/stdio/setvbuf.c
@@ -10,14 +10,14 @@ int
setvbuf(FILE *restrict fp, char *restrict buf, int mode, size_t size)
{
int flags;
- char *p;
+ unsigned char *p;
size_t l;
if (_flsbuf(fp) == EOF)
return EOF;
if (buf)
- p = buf, l = size;
+ p = (unsigned char *) buf, l = size;
else
p = fp->buf, l = fp->len;