From fabe2864f56c2050f7e28a988f79a1354cb2691f Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Tue, 27 Jun 1995 16:02:41 +0000 Subject: (S_proc_dostop): Remove assigments from inside if tests. --- proc/mgt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'proc/mgt.c') diff --git a/proc/mgt.c b/proc/mgt.c index 26b86f91..7f9e5f3c 100644 --- a/proc/mgt.c +++ b/proc/mgt.c @@ -301,9 +301,11 @@ S_proc_dostop (struct proc *p, unsigned int nthreads = 2, i; error_t err; - if (err = task_suspend (p->p_task)) + err = task_suspend (p->p_task); + if (err) return err; - if (err = task_threads (p->p_task, &threads, &nthreads)) + err = task_threads (p->p_task, &threads, &nthreads); + if (err) return err; for (i = 0; i < nthreads; i++) { @@ -314,7 +316,8 @@ S_proc_dostop (struct proc *p, if (threads != threadbuf) vm_deallocate (mach_task_self (), (vm_address_t) threads, nthreads * sizeof (thread_t)); - if (err = task_resume (p->p_task)) + err = task_resume (p->p_task); + if (err) return err; mach_port_deallocate (mach_task_self (), contthread); -- cgit v1.2.3