aboutsummaryrefslogtreecommitdiff
path: root/gdb/gnu-nat.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-03-20 01:37:10 +0000
committerAndrew Cagney <cagney@redhat.com>2001-03-20 01:37:10 +0000
commit3c37485b16d873d9fd8d5d448dce60a2d890e286 (patch)
tree01b974afe0c43b13dc0a0efda5ce8f0cf4b1a6a4 /gdb/gnu-nat.c
parent0e52036f1f47078a9863f6a377ff11e10a81e8c4 (diff)
downloadgdb-3c37485b16d873d9fd8d5d448dce60a2d890e286.zip
gdb-3c37485b16d873d9fd8d5d448dce60a2d890e286.tar.gz
gdb-3c37485b16d873d9fd8d5d448dce60a2d890e286.tar.bz2
malloc() -> xmalloc.
Move malloc() decl to utils.c
Diffstat (limited to 'gdb/gnu-nat.c')
-rw-r--r--gdb/gnu-nat.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 54b543b..3ec3352 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -539,7 +539,7 @@ make_proc (struct inf *inf, mach_port_t port, int tid)
{
error_t err;
mach_port_t prev_port = MACH_PORT_NULL;
- struct proc *proc = malloc (sizeof (struct proc));
+ struct proc *proc = xmalloc (sizeof (struct proc));
proc->port = port;
proc->tid = tid;
@@ -636,10 +636,7 @@ _proc_free (struct proc *proc)
struct inf *
make_inf (void)
{
- struct inf *inf = malloc (sizeof (struct inf));
-
- if (!inf)
- return 0;
+ struct inf *inf = xmalloc (sizeof (struct inf));
inf->task = 0;
inf->threads = 0;