[PATCH 1/2] link_map: Pull release_buffer() into file scope

Mark Wielaard mark@klomp.org
Thu Dec 10 13:00:52 GMT 2020


Hi Timm,

On Mon, 2020-12-07 at 12:11 +0100, Timm Bäder via Elfutils-devel wrote:
> Get rid of a nested function this way. Add a memory_closure struct to
> keep the functions clean.

Pushed with one fix.

> @@ -319,7 +331,7 @@ report_r_debug (uint_fast8_t elfclass, uint_fast8_t elfdata,
>    while (next != 0 && ++iterations < dwfl->lookup_elts)
>      {
>        if (read_addrs (next, 4))
> -	return release_buffer (-1);
> +	return release_buffer (&memory_closure, &buffer, &buffer_available, 0);

The last argument must be -1.

Cheers,

Mark



More information about the Elfutils-devel mailing list