Re: [PATCH v1 03/10] target_fileio_read_stralloc: add an optional length parameter
Matthieu Longo <[email protected]> Mon, 27 Jul 2026 15:53:24 +0100
| Newsgroups | gmane.comp.gdb.patches |
|---|---|
| Message-ID | <[email protected]> |
On 21/07/2026 22:28, Luis wrote:
> Empty commit message...
Fixed in the next revision.
target_fileio_read_stralloc: add an optional length parameter
Extend target_fileio_read_stralloc with an optional output parameter
that returns the number of bytes read, excluding the terminating NUL
byte.
Most callers only need the returned NUL-terminated buffer and can
ignore the new parameter, but callers that need the number of bytes
read can now obtain it without recomputing it.
While updating the function, make a couple of minor cleanups by using
'\0' instead of 0 for character literals and clarifying the function
documentation.