Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] aix-thread.c: Don't use strerror() or realloc()
Date: Tue, 16 Jul 2002 00:43:00 -0000	[thread overview]
Message-ID: <1020716002747.ZM6669@localhost.localdomain> (raw)

I've just committed the following changes...

	* aix-thread.c (ptrace_check): Use safe_strerror() instead of
	strerror().
	(pdc_realloc): Use xrealloc() instead of realloc().

Index: aix-thread.c
===================================================================
RCS file: /cvs/src/src/gdb/aix-thread.c,v
retrieving revision 1.4
diff -u -p -r1.4 aix-thread.c
--- aix-thread.c	15 Jul 2002 23:33:09 -0000	1.4
+++ aix-thread.c	16 Jul 2002 00:20:36 -0000
@@ -241,7 +241,7 @@ ptrace_check (int req, int id, int ret)
       break;
     }
   error ("aix-thread: ptrace (%d, %d) returned %d (errno = %d %s)",
-	 req, id, ret, errno, strerror (errno));
+	 req, id, ret, errno, safe_strerror (errno));
   return 0;  /* not reached.  */
 }
 
@@ -507,7 +507,7 @@ pdc_realloc (pthdb_user_t user, void *bu
     fprintf_unfiltered (gdb_stdlog,
       "pdc_realloc (user = %ld, buf = 0x%lx, len = %ld, bufp = 0x%lx)",
       user, (long) buf, len, (long) bufp);
-  *bufp = realloc (buf, len);
+  *bufp = xrealloc (buf, len);
   if (debug_aix_thread)
     fprintf_unfiltered (gdb_stdlog, "  realloc returned 0x%lx", (long) *bufp);
   return *bufp ? PDC_SUCCESS : PDC_FAILURE;


                 reply	other threads:[~2002-07-16  0:27 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=1020716002747.ZM6669@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /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