From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2103) id 60F793858D35; Fri, 24 Mar 2023 14:08:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 60F793858D35 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Nick Alcock To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] libctf: fix a comment typo X-Act-Checkin: binutils-gdb X-Git-Author: Nick Alcock X-Git-Refname: refs/heads/master X-Git-Oldrev: cce0bb8ff8a4922da4318a3654f68cfabb4c3ec8 X-Git-Newrev: 04d91c807eaf4395472409a53e2acd9ad89683f0 Message-Id: <20230324140851.60F793858D35@sourceware.org> Date: Fri, 24 Mar 2023 14:08:51 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Mar 2023 14:08:51 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D04d91c807eaf= 4395472409a53e2acd9ad89683f0 commit 04d91c807eaf4395472409a53e2acd9ad89683f0 Author: Nick Alcock Date: Mon Mar 13 17:36:33 2023 +0000 libctf: fix a comment typo =20 ctf_dedup's intern() function does not return a dynamically allocated string, so I just spent ten minutes auditing for obvious memory leaks that couldn't actually happen. Update the comment to note what it actually returns (a pointer into an atoms table: i.e. possibly not a new string, and not so easily leakable). =20 libctf/ * ctf-dedup.c (intern): Update comment. Diff: --- libctf/ctf-dedup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libctf/ctf-dedup.c b/libctf/ctf-dedup.c index 6297c45c84d..5fdddfd0b54 100644 --- a/libctf/ctf-dedup.c +++ b/libctf/ctf-dedup.c @@ -412,7 +412,7 @@ intern (ctf_dict_t *fp, char *atom) /* Add an indication of the namespace to a type name in a way that is not = valid for C identifiers. Used to maintain hashes of type names to other thin= gs while allowing for the four C namespaces (normal, struct, union, enum). - Return a new dynamically-allocated string. */ + Return a pointer into the cd_decorated_names atoms table. */ static const char * ctf_decorate_type_name (ctf_dict_t *fp, const char *name, int kind) {