libc: io: fix ringbuf_read/write not returning the correct values

This commit is contained in:
2026-07-19 13:27:57 +01:00
parent 12df8d517d
commit 5c9ab75dbc
+2 -2
View File
@@ -145,7 +145,7 @@ long __libc_ringbuf_read(struct ringbuf *buf, void *p, size_t count)
memcpy(dest, src, to_copy);
nr_read += available;
nr_read += to_copy;
__libc_ringbuf_put_read_buffer(buf, &src, &to_copy);
}
@@ -183,7 +183,7 @@ long __libc_ringbuf_write(struct ringbuf *buf, const void *p, size_t count)
memcpy(dest, src, to_copy);
nr_written += available;
nr_written += to_copy;
__libc_ringbuf_put_write_buffer(buf, &dest, &to_copy);
}