From f07bc340539b7459fca52500e2edd6c81b14dde2 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 8 Nov 1995 01:20:49 +0000 Subject: (S_proc_getprocinfo): Calculate the size of the returned structure correctly. --- proc/info.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'proc/info.c') 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) { -- cgit v1.2.3