Move realoc() decl to utils.c. s/realloc()/xrealloc()/.

This commit is contained in:
Andrew Cagney
2001-03-20 00:54:43 +00:00
parent 81b8eb809e
commit 0e52036f1f
7 changed files with 19 additions and 12 deletions

View File

@@ -544,8 +544,9 @@ create_file_handler (int fd, int mask, handler_func * proc, gdb_client_data clie
gdb_notifier.num_fds++;
if (gdb_notifier.poll_fds)
gdb_notifier.poll_fds =
(struct pollfd *) realloc (gdb_notifier.poll_fds,
(gdb_notifier.num_fds) * sizeof (struct pollfd));
(struct pollfd *) xrealloc (gdb_notifier.poll_fds,
(gdb_notifier.num_fds
* sizeof (struct pollfd)));
else
gdb_notifier.poll_fds =
(struct pollfd *) xmalloc (sizeof (struct pollfd));