"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: Replace fparseln(3) with getline(3)
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Sat, 2 Jan 2021 21:17:56 +0100

Download raw body.

Thread
On Sat, Jan 02, 2021 at 08:07:47PM +0100, Christian Weisgerber wrote:
> replace fparseln(3) with getline(3), for better portability
> 
> This also reduces the malloc/free calls and fixes a memory leak in
> get_modified_file_content_status().
> 
> ok?

Ok. Thank you! This was on my todo list, too :)

Just one small request:

Could we keep spaces around the - operator on lines such as this?

> +		if (linelen > 0 && line[linelen-1] == '\n')

Instead:

 +		if (linelen > 0 && line[linelen - 1] == '\n')