diff options
Diffstat (limited to 'libc/stdio/open_memstream.c')
-rw-r--r-- | libc/stdio/open_memstream.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/stdio/open_memstream.c b/libc/stdio/open_memstream.c index e7b1cf435..5861017e4 100644 --- a/libc/stdio/open_memstream.c +++ b/libc/stdio/open_memstream.c @@ -97,7 +97,7 @@ static int oms_seek(register void *cookie, __offmax_t *pos, int whence) if (buf) { *COOKIE->bufloc = COOKIE->buf = buf; COOKIE->len = leastlen; - memset(buf + COOKIE->eof, leastlen - COOKIE->eof, 0); /* 0-fill */ + memset(buf + COOKIE->eof, 0, leastlen - COOKIE->eof); /* 0-fill */ } else { /* TODO: check glibc errno setting... */ return -1; @@ -107,7 +107,7 @@ static int oms_seek(register void *cookie, __offmax_t *pos, int whence) *pos = COOKIE->pos = --leastlen; if (leastlen > COOKIE->eof) { - memset(COOKIE->buf + COOKIE->eof, leastlen - COOKIE->eof, 0); + memset(COOKIE->buf + COOKIE->eof, 0, leastlen - COOKIE->eof); *COOKIE->sizeloc = COOKIE->eof; } |