diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-03-20 01:37:10 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-03-20 01:37:10 +0000 |
commit | 211496566bf99ace06427acd2fccc3aa85d4d19c (patch) | |
tree | 49686c11f98c87c34da0f10b077e0275c0ec1a0c /gdb/gnu-nat.c | |
parent | 365f67c1fd2c8d32730c6715e0034372402e7e2e (diff) | |
download | gdb-211496566bf99ace06427acd2fccc3aa85d4d19c.tar.gz |
malloc() -> xmalloc.
Move malloc() decl to utils.c
Diffstat (limited to 'gdb/gnu-nat.c')
-rw-r--r-- | gdb/gnu-nat.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 54b543be759..3ec33520fbe 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; |