On 10:13:06,  7.04.16, Martin Natano wrote:
> On Wed, Apr 06, 2016 at 09:47:35AM +0200, Michal Mazurek wrote:
> > relebad used to have more body:
> >     relebad:
> >             PRELE(t);
> >             return (error);
> > But then PRELE(t); was removed. This diff gets rid of what remains of
> > relebad.
> 
> Looks good to me.

I was told parens in 'return' are now to be eliminated, here is an
updated diff:

Index: sys_process.c
===================================================================
RCS file: /cvs/src/sys/kern/sys_process.c,v
retrieving revision 1.68
diff -u -p -r1.68 sys_process.c
--- sys_process.c       24 Sep 2015 20:35:18 -0000      1.68
+++ sys_process.c       9 Apr 2016 13:59:18 -0000
@@ -454,7 +454,7 @@ sys_ptrace(struct proc *p, void *v, regi
                /* If the address parameter is not (int *)1, set the pc. */
                if ((int *)SCARG(uap, addr) != (int *)1)
                        if ((error = process_set_pc(t, SCARG(uap, addr))) != 0)
-                               goto relebad;
+                               return error;
 
 #ifdef PT_STEP
                /*
@@ -462,7 +462,7 @@ sys_ptrace(struct proc *p, void *v, regi
                 */
                error = process_sstep(t, req == PT_STEP);
                if (error)
-                       goto relebad;
+                       return error;
 #endif
                goto sendsig;
 
@@ -492,7 +492,7 @@ sys_ptrace(struct proc *p, void *v, regi
                 */
                error = process_sstep(t, 0);
                if (error)
-                       goto relebad;
+                       return error;
 #endif
 
                /* give process back to original parent or init */
@@ -522,9 +522,6 @@ sys_ptrace(struct proc *p, void *v, regi
                }
 
                return (0);
-
-       relebad:
-               return (error);
 
        case  PT_KILL:
                if (SCARG(uap, pid) < THREAD_PID_OFFSET && tr->ps_single)

-- 
Michal Mazurek

Reply via email to