diff options
author | Miles Bader <miles@gnu.org> | 1995-11-08 01:20:49 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-11-08 01:20:49 +0000 |
commit | f07bc340539b7459fca52500e2edd6c81b14dde2 (patch) | |
tree | eb170ea13bc04beb155deb996a8b547763bbe43c /proc | |
parent | 20c1bca35cdbfd0456326ddce329361fad8f627b (diff) |
(S_proc_getprocinfo): Calculate the size of the returned structure correctly.
Diffstat (limited to 'proc')
-rw-r--r-- | proc/info.c | 5 |
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) { |