public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Alan Modra <amodra@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: remove use of PTR Date: Thu, 12 May 2022 23:23:42 +0000 (GMT) [thread overview] Message-ID: <20220512232342.B00CA3858C2D@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=903f7818e70ba7016d4b7d2d98c88446d5f40e71 commit 903f7818e70ba7016d4b7d2d98c88446d5f40e71 Author: Alan Modra <amodra@gmail.com> Date: Tue May 10 22:56:43 2022 +0930 gdb: remove use of PTR PTR will disappear from ansidecl.h and libiberty on the next import from gcc. Remove current uses in gdb. Diff: --- gdb/alloc.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gdb/alloc.c b/gdb/alloc.c index 60098c7b0c8..c6234e985be 100644 --- a/gdb/alloc.c +++ b/gdb/alloc.c @@ -44,10 +44,7 @@ consistent semantics and guard against typical memory management problems. */ -/* NOTE: These are declared using PTR to ensure consistency with - "libiberty.h". xfree() is GDB local. */ - -PTR /* ARI: PTR */ +void * xmalloc (size_t size) { void *val; @@ -64,8 +61,8 @@ xmalloc (size_t size) return val; } -PTR /* ARI: PTR */ -xrealloc (PTR ptr, size_t size) /* ARI: PTR */ +void * +xrealloc (void *ptr, size_t size) { void *val; @@ -84,7 +81,7 @@ xrealloc (PTR ptr, size_t size) /* ARI: PTR */ return val; } -PTR /* ARI: PTR */ +void * xcalloc (size_t number, size_t size) { void *mem;
reply other threads:[~2022-05-12 23:23 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220512232342.B00CA3858C2D@sourceware.org \ --to=amodra@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: linkBe 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).