Message ID | 20231017185438.407796-1-torbjorn.svensson@foss.st.com |
---|---|
State | Accepted |
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4336949vqb; Tue, 17 Oct 2023 11:56:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGIR2pPpE15ZpCjnXBjsqmv+IBycd9iIfEEw9vuC7hCvv7FiyFw7VBhum53fomgqNTNqZy/ X-Received: by 2002:a05:6102:101d:b0:457:bc46:8ba3 with SMTP id q29-20020a056102101d00b00457bc468ba3mr3924740vsp.9.1697569012665; Tue, 17 Oct 2023 11:56:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697569012; cv=pass; d=google.com; s=arc-20160816; b=mYmOwKDbEH24Cv6EERBd6YfmeXZzrlE+Tjos1xwChW1/I9S8DYWfWz4GcbotnWq5Iz 2D95ZW3JrqJxSdAkwX1YcJh+RCxEO1fgDMt8VAu7QPC9UoGdxsI1FJciJwxletXUFsoV KAc7reTgFV4eZmxvzNf/QRneM04rfxMDPlxB+hByxeNOh3c6ZrrdaQqKXrVsboado/Uu t+LjK2gMgsax5Dc5ZhfaBXp6ekvefWt2LaxKwRnSt4j8L0Kir72t25to2Dz3RziJXdsK IszIHTw/591Hlrechu9zI2CAD7eYjxIIrcOve5YtyS+HMGc56655PRH4LM4Zp00swpbQ vh2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=MjQhCYuS6RT3UYEa7ouOjSSUsoB68DOlbzqNF2rDNHU=; fh=aw0KadqhksuVD6deAZJAOU1WLYJVbKb0Ki5ELDqGjrQ=; b=gjHka4Al+sZ9Mm8Wb7OepKfCUlDoQn2f/oFYCOu6OrkkCrx+rJima2EMIU1+mouaCB fa26gl35lDHz2KLb2FHJ44SgVgI85mtRpDr2CGTBDLCouLvFk90y+unOwdO3Xnq8ttCE amWG69KKRFDp2V1wjBln1arGzmmyFefdh9Gf5Rrkhj9EpkYu2kfL+WAk3RHoUJELfogg LsOwo9Xkxh7LvMmvgZI382qExvEoDXof8JxTu6DXK6vk5MbW3fUPFf4BLxLnfJLikrf7 m2W7A1cWfJ9pDM8/QmIje3Tzei7o2DzVkKQnvIq3ZLBFJ4QjQsGcNyCBxCIyrKa3n+PN +wbA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=OmiLewmy; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id a22-20020a0ca996000000b0066d01d4ee29si1505611qvb.295.2023.10.17.11.56.52 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 11:56:52 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=OmiLewmy; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5A660385802F for <ouuuleilei@gmail.com>; Tue, 17 Oct 2023 18:56:52 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by sourceware.org (Postfix) with ESMTPS id 696953858C52 for <binutils@sourceware.org>; Tue, 17 Oct 2023 18:56:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 696953858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=foss.st.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 696953858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=185.132.182.106 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697569008; cv=none; b=XWLLvLk39usdBYmdYjZFMwVuYlGkKgHtVxAUmO2nOVQVbBlzK1I1MbACInaWEG/nIYS9RbB+XmtGnD7hzh436Di5OGaGtbs04lRT5u5KVwZv9/kw9+FnxLzWzh0vkpkfL/y2IOo+lIsO8Cl7+/VHV3aMohpiB1vxZ3Y1G4qrvek= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697569008; c=relaxed/simple; bh=E6qICc2nFo89+XqZySGrphadVV2+8DHk19csj4j64W0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=twf9sii0efP934J+lqBywh5KneLbpN6F9y/aotqUK36MRZG2tpWyA9sqUIbaRvrbnp+yB3IsGrmDehCpeLDA9hHPZ7uDApAvDkJrIo08rYcELvBroino4Lp8QZqrh5foVeR4JkLI6XtmIYsPczufwaAXjD7dy1p5VnoWlji2uqw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 39HCcwKv023381; Tue, 17 Oct 2023 20:56:41 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s= selector1; bh=MjQhCYuS6RT3UYEa7ouOjSSUsoB68DOlbzqNF2rDNHU=; b=Om iLewmyTBtCLhdwqp5QsiN3NKniXzgfJDeu5BtNVBPdqb+tvM7R7NuQCSY329t29k P5+dE1i23suUDLdk4oH5cDPJhJ9Xl/XcSumgS/HvXr3e5VI6Ezzqm8UMn5ymOLRb Qrwpp8EIELgcaYxtL5NEiIfPsQ9CdVG7UObIZjf6TOO863IhTa8lb6Dg0LM1vpj+ hUssMOHkL2fZDxBDrB6ZPpkQLRi5dfDu2Yi1Zntu1sp3CbnK3gue9PL7WSEjmJ43 kSmZbFCn6V7aTx73J4FNRlx2Zij6z+C7dLZXgJLdPbT9imVt6SaDNo91wIeMVykr q4D0fnxSsY+htO891NqQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3tqkdg5q42-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Oct 2023 20:56:41 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 13BDF100059; Tue, 17 Oct 2023 20:56:41 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 0A19727BD22; Tue, 17 Oct 2023 20:56:41 +0200 (CEST) Received: from jkgcxl0004.jkg.st.com (10.74.22.255) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 17 Oct 2023 20:56:40 +0200 From: =?utf-8?q?Torbj=C3=B6rn_SVENSSON?= <torbjorn.svensson@foss.st.com> To: <binutils@sourceware.org>, <nick.alcock@oracle.com> CC: =?utf-8?q?Torbj=C3=B6rn_SVENSSON?= <torbjorn.svensson@foss.st.com> Subject: [PATCH] libctf: Return CTF_ERR in ctf_type_resolve_unsliced PR 30836 Date: Tue, 17 Oct 2023 20:54:39 +0200 Message-ID: <20231017185438.407796-1-torbjorn.svensson@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <eb3e3e3e-1a86-4a59-b5cb-db874f80361e@foss.st.com> References: <eb3e3e3e-1a86-4a59-b5cb-db874f80361e@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.74.22.255] X-ClientProxiedBy: EQNCAS1NODE3.st.com (10.75.129.80) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-17_03,2023-10-17_01,2023-05-22_02 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780030124921160257 X-GMAIL-MSGID: 1780030124921160257 |
Series |
libctf: Return CTF_ERR in ctf_type_resolve_unsliced PR 30836
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
Torbjorn SVENSSON
Oct. 17, 2023, 6:54 p.m. UTC
There were one more place where the incorrect return value was used.
@Nick: Ok for trunk? :)
--
In commit 998a4f589d68503f79695f180fdf1742eeb0a39d, all but one return
statement was updated to return the error proper value. This commit
rectifies that missed return statement.
libctf/
ctf-types.c (ctf_type_resolve_unsliced): Return CTF_ERR on error.
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
---
libctf/ctf-types.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 17 Oct 2023, Torbjörn SVENSSON uttered the following: > There were one more place where the incorrect return value was used. > > @Nick: Ok for trunk? :) By all means: push away. Dead obvious too, right above a correct one, and I still overlooked it. (I just checked for further instances of this in ctf-types.c and could see none.)
On 2023-10-17 21:40, Nick Alcock wrote: > On 17 Oct 2023, Torbjörn SVENSSON uttered the following: > >> There were one more place where the incorrect return value was used. >> >> @Nick: Ok for trunk? :) > > By all means: push away. Dead obvious too, right above a correct one, > and I still overlooked it. > > (I just checked for further instances of this in ctf-types.c and could > see none.) Pushed.
On 18 Oct 2023, Torbjorn SVENSSON stated: > > > On 2023-10-17 21:40, Nick Alcock wrote: >> On 17 Oct 2023, Torbjörn SVENSSON uttered the following: >> >>> There were one more place where the incorrect return value was used. >>> >>> @Nick: Ok for trunk? :) >> By all means: push away. Dead obvious too, right above a correct one, >> and I still overlooked it. >> (I just checked for further instances of this in ctf-types.c and could >> see none.) > > Pushed. ... as is the testcase.
diff --git a/libctf/ctf-types.c b/libctf/ctf-types.c index 694d6ea79e4..4d3c01dbbb4 100644 --- a/libctf/ctf-types.c +++ b/libctf/ctf-types.c @@ -602,7 +602,7 @@ ctf_type_resolve_unsliced (ctf_dict_t *fp, ctf_id_t type) const ctf_type_t *tp; if ((type = ctf_type_resolve (fp, type)) == CTF_ERR) - return -1; + return CTF_ERR; if ((tp = ctf_lookup_by_id (&fp, type)) == NULL) return CTF_ERR; /* errno is set for us. */