diff options
Diffstat (limited to 'gdb/nat/linux-osdata.c')
-rw-r--r-- | gdb/nat/linux-osdata.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/nat/linux-osdata.c b/gdb/nat/linux-osdata.c index 502356f..03e4a86 100644 --- a/gdb/nat/linux-osdata.c +++ b/gdb/nat/linux-osdata.c @@ -337,7 +337,7 @@ linux_xfer_osdata_processes (gdb_byte *readbuf, strcpy (user, "?"); /* Find CPU cores used by the process. */ - cores = (int *) xcalloc (num_cores, sizeof (int)); + cores = XCNEWVEC (int, num_cores); task_count = get_cores_used_by_process (pid, cores, num_cores); cores_str = (char *) xcalloc (task_count, sizeof ("4294967295") + 1); @@ -460,7 +460,7 @@ linux_xfer_osdata_processgroups (gdb_byte *readbuf, { struct dirent *dp; const size_t list_block_size = 512; - PID_T *process_list = (PID_T *) xmalloc (list_block_size * 2 * sizeof (PID_T)); + PID_T *process_list = XNEWVEC (PID_T, list_block_size * 2); size_t process_count = 0; size_t i; |