Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/linux/common KNF; no binary changes



details:   https://anonhg.NetBSD.org/src/rev/5cb96fd7aa01
branches:  trunk
changeset: 821887:5cb96fd7aa01
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Feb 20 16:30:41 2017 +0000

description:
KNF; no binary changes

diffstat:

 sys/compat/linux/common/linux_signal.c |  50 +++++++++++++++++-----------------
 1 files changed, 25 insertions(+), 25 deletions(-)

diffs (195 lines):

diff -r 515a945ca6b6 -r 5cb96fd7aa01 sys/compat/linux/common/linux_signal.c
--- a/sys/compat/linux/common/linux_signal.c    Mon Feb 20 16:26:30 2017 +0000
+++ b/sys/compat/linux/common/linux_signal.c    Mon Feb 20 16:30:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_signal.c,v 1.78 2017/02/20 16:26:30 rin Exp $    */
+/*     $NetBSD: linux_signal.c,v 1.79 2017/02/20 16:30:41 rin Exp $    */
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.78 2017/02/20 16:26:30 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.79 2017/02/20 16:30:41 rin Exp $");
 
 #define COMPAT_LINUX 1
 
@@ -336,18 +336,18 @@
 #endif
 
        if (SCARG(uap, sigsetsize) != sizeof(linux_sigset_t))
-               return (EINVAL);
+               return EINVAL;
 
        if (SCARG(uap, nsa)) {
                error = copyin(SCARG(uap, nsa), &nlsa, sizeof(nlsa));
                if (error)
-                       return (error);
+                       return error;
                linux_to_native_sigaction(&nbsa, &nlsa);
        }
 
        sig = SCARG(uap, signum);
        if (sig < 0 || sig >= LINUX__NSIG)
-               return (EINVAL);
+               return EINVAL;
        if (sig > 0 && !linux_to_native_signo[sig]) {
                /* Pretend that we did something useful for unknown signals. */
                obsa.sa_handler = SIG_IGN;
@@ -358,7 +358,7 @@
                if (SCARG(uap, nsa) &&
                    (nlsa.linux_sa_flags & LINUX_SA_RESTORER) &&
                    (tramp = nlsa.linux_sa_restorer) != NULL)
-                               vers = 2;
+                       vers = 2;
 #endif
 
                error = sigaction1(l, linux_to_native_signo[sig],
@@ -366,7 +366,7 @@
                    SCARG(uap, osa) ? &obsa : NULL,
                    tramp, vers);
                if (error)
-                       return (error);
+                       return error;
        }
        if (SCARG(uap, osa)) {
                native_to_linux_sigaction(&olsa, &obsa);
@@ -380,9 +380,9 @@
 
                error = copyout(&olsa, SCARG(uap, osa), sizeof(olsa));
                if (error)
-                       return (error);
+                       return error;
        }
-       return (0);
+       return 0;
 }
 
 int
@@ -404,13 +404,13 @@
                how = SIG_SETMASK;
                break;
        default:
-               return (EINVAL);
+               return EINVAL;
        }
 
        if (set) {
                error = copyin(set, &nlss, sizeof(nlss));
                if (error)
-                       return (error);
+                       return error;
                linux_old_to_native_sigset(&nbss, &nlss);
        }
        mutex_enter(p->p_lock);
@@ -418,14 +418,14 @@
            set ? &nbss : NULL, oset ? &obss : NULL);
        mutex_exit(p->p_lock);
        if (error)
-               return (error);
+               return error;
        if (oset) {
                native_to_linux_old_sigset(&olss, &obss);
                error = copyout(&olss, oset, sizeof(olss));
                if (error)
-                       return (error);
+                       return error;
        }
-       return (error);
+       return error;
 }
 
 int
@@ -444,7 +444,7 @@
        int error, how;
 
        if (SCARG(uap, sigsetsize) != sizeof(linux_sigset_t))
-               return (EINVAL);
+               return EINVAL;
 
        switch (SCARG(uap, how)) {
        case LINUX_SIG_BLOCK:
@@ -457,7 +457,7 @@
                how = SIG_SETMASK;
                break;
        default:
-               return (EINVAL);
+               return EINVAL;
        }
 
        set = SCARG(uap, set);
@@ -466,7 +466,7 @@
        if (set) {
                error = copyin(set, &nlss, sizeof(nlss));
                if (error)
-                       return (error);
+                       return error;
                linux_to_native_sigset(&nbss, &nlss);
        }
        mutex_enter(p->p_lock);
@@ -477,7 +477,7 @@
                native_to_linux_sigset(&olss, &obss);
                error = copyout(&olss, oset, sizeof(olss));
        }
-       return (error);
+       return error;
 }
 
 int
@@ -491,7 +491,7 @@
        linux_sigset_t lss;
 
        if (SCARG(uap, sigsetsize) != sizeof(linux_sigset_t))
-               return (EINVAL);
+               return EINVAL;
 
        sigpending1(l, &bss);
        native_to_linux_sigset(&lss, &bss);
@@ -526,7 +526,7 @@
 
        lss = SCARG(uap, mask);
        linux_old_to_native_sigset(&bss, &lss);
-       return (sigsuspend1(l, &bss));
+       return sigsuspend1(l, &bss);
 }
 #endif /* __amd64__ */
 
@@ -542,15 +542,15 @@
        int error;
 
        if (SCARG(uap, sigsetsize) != sizeof(linux_sigset_t))
-               return (EINVAL);
+               return EINVAL;
 
        error = copyin(SCARG(uap, unewset), &lss, sizeof(linux_sigset_t));
        if (error)
-               return (error);
+               return error;
 
        linux_to_native_sigset(&bss, &lss);
 
-       return (sigsuspend1(l, &bss));
+       return sigsuspend1(l, &bss);
 }
 
 static int
@@ -632,7 +632,7 @@
 
        /* XXX To really implement this we need to      */
        /* XXX keep a list of queued signals somewhere. */
-       return (linux_sys_kill(l, (const void *)uap, retval));
+       return linux_sys_kill(l, (const void *)uap, retval);
 }
 
 int
@@ -649,7 +649,7 @@
        SCARG(&ka, pid) = SCARG(uap, pid);
        sig = SCARG(uap, signum);
        if (sig < 0 || sig >= LINUX__NSIG)
-               return (EINVAL);
+               return EINVAL;
        SCARG(&ka, signum) = linux_to_native_signo[sig];
        return sys_kill(l, &ka, retval);
 }



Home | Main Index | Thread Index | Old Index