[PATCHv2] support ZSTD compression algorithm

Mark Wielaard mark@klomp.org
Wed Dec 21 23:14:34 GMT 2022


Hi Martin,

On Wed, Dec 21, 2022 at 12:09:21PM +0100, Martin Liška wrote:
> > Or you return a special value from the function (assuming all callers
> > check for an error here). And/Or if the program needs a cleanup you'll
> > goto cleanup (as is done in process_file).
> 
> I think it's fine as we return UNSET in that case and the caller goes directly
> to cleanup (or abort is called for the second call site):
> 
> 	  enum ch_type schtype = get_section_chtype (scn, shdr, sname, ndx);
> 	  if (schtype == UNSET)
> 	    goto cleanup;

O, that is good.

Is the abort () at the second call site because that cannot happen? Or
should that also goto cleanup?

Cheers,

Mark


More information about the Elfutils-devel mailing list