diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-11-02 16:00:03 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-11-02 16:00:03 +0100 |
commit | 610c428cf8c9340d955c79cd2daca3ed8657f2b1 (patch) | |
tree | 864de76b1d318fa6f1d28cb78ade52461335cf1c /libps | |
parent | 673603dae49fd06de782780a38e2914ed8cd8777 (diff) |
Fix proc_getprocinfo calls
The deallocation also needs to be fixed.
Also, fetch_procinfo already took care of the conversion.
* exec/elfcore.c (dump_core): Fix procinfoCnt taken from
proc_getprocinfo.
* utils/login.c (check_owned): Likewise.
* libps/procstat.c (merge_procinfo): Remove conversion between bytes and
int, already handled by fetch_procinfo.
Diffstat (limited to 'libps')
-rw-r--r-- | libps/procstat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libps/procstat.c b/libps/procstat.c index b00c9e41..0d4a565b 100644 --- a/libps/procstat.c +++ b/libps/procstat.c @@ -192,7 +192,7 @@ merge_procinfo (struct proc_stat *ps, ps_flags_t need, ps_flags_t have) return ENOMEM; } new_pi = ps->proc_info; - new_pi_size = ps->proc_info_size / sizeof(*(procinfo_t)0); + new_pi_size = ps->proc_info_size; if (really_need & PSTAT_THREAD_WAITS) /* We're going to get thread waits info, so make some storage for it too.*/ @@ -240,7 +240,7 @@ merge_procinfo (struct proc_stat *ps, ps_flags_t need, ps_flags_t have) else free (ps->proc_info); ps->proc_info = new_pi; - ps->proc_info_size = new_pi_size * sizeof(*(procinfo_t)0); + ps->proc_info_size = new_pi_size; ps->proc_info_vm_alloced = 1; } |