From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 5CCA83858D1E for ; Wed, 21 Dec 2022 23:14:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5CCA83858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from reform (deer0x15.wildebeest.org [172.31.17.151]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 66BD4300071A; Thu, 22 Dec 2022 00:14:34 +0100 (CET) Received: by reform (Postfix, from userid 1000) id 311792E803C3; Thu, 22 Dec 2022 00:14:34 +0100 (CET) Date: Thu, 22 Dec 2022 00:14:34 +0100 From: Mark Wielaard To: Martin =?utf-8?B?TGnFoWth?= Cc: elfutils-devel@sourceware.org Subject: Re: [PATCHv2] support ZSTD compression algorithm Message-ID: References: <24d7165b-b8ac-ea5d-a046-aec2203696a9@suse.cz> <53071eba-0cbc-fb7e-c78c-dfc52cc2843f@suse.cz> <628dcc49-8836-c1b0-62bf-e6567a98dd62@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <628dcc49-8836-c1b0-62bf-e6567a98dd62@suse.cz> X-Spam-Status: No, score=-3032.4 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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