From: Nick Alcock <nix@sourceware.org>
To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org
Subject: [binutils-gdb] libctf: fix a comment typo
Date: Fri, 24 Mar 2023 14:08:51 +0000 (GMT) [thread overview]
Message-ID: <20230324140851.60F793858D35@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=04d91c807eaf4395472409a53e2acd9ad89683f0
commit 04d91c807eaf4395472409a53e2acd9ad89683f0
Author: Nick Alcock <nick.alcock@oracle.com>
Date: Mon Mar 13 17:36:33 2023 +0000
libctf: fix a comment typo
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).
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 things
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)
{
next reply other threads:[~2023-03-24 14:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 14:08 Nick Alcock [this message]
2024-04-19 15:51 Nick Alcock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230324140851.60F793858D35@sourceware.org \
--to=nix@sourceware.org \
--cc=bfd-cvs@sourceware.org \
--cc=gdb-cvs@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).