summaryrefslogtreecommitdiff
path: root/proc
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-11-08 01:20:49 +0000
committerMiles Bader <miles@gnu.org>1995-11-08 01:20:49 +0000
commitf07bc340539b7459fca52500e2edd6c81b14dde2 (patch)
treeeb170ea13bc04beb155deb996a8b547763bbe43c /proc
parent20c1bca35cdbfd0456326ddce329361fad8f627b (diff)
(S_proc_getprocinfo): Calculate the size of the returned structure correctly.
Diffstat (limited to 'proc')
-rw-r--r--proc/info.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/proc/info.c b/proc/info.c
index e16ed890..063434d1 100644
--- a/proc/info.c
+++ b/proc/info.c
@@ -336,9 +336,8 @@ S_proc_getprocinfo (struct proc *callerp,
else
nthreads = 0;
- structsize = (sizeof (struct procinfo)
- + nthreads * sizeof (struct thread_basic_info)
- + nthreads * sizeof (struct thread_sched_info));
+ structsize =
+ sizeof (struct procinfo) + nthreads * sizeof (pi->threadinfos[0]);
if (structsize / sizeof (int) > *piarraylen)
{