On 4/18/2023 4:44 AM, Ilpo Järvinen wrote:
alloc_buffer() has local start_ptr variable which is unnecessary.
Assign the pointer of the allocated buffer directly to startptr that is a global variable in fill_buf to simplify the code in alloc_buffer().
I think the opposite (removing the global variable) would make the code more manageable. Tests manage their own buffer pointers, there is no need for a global buffer pointer (that I can see).