Module Name: src Committed By: rin Date: Mon Feb 20 16:30:41 UTC 2017
Modified Files: src/sys/compat/linux/common: linux_signal.c Log Message: KNF; no binary changes To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/compat/linux/common/linux_signal.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/compat/linux/common/linux_signal.c diff -u src/sys/compat/linux/common/linux_signal.c:1.78 src/sys/compat/linux/common/linux_signal.c:1.79 --- src/sys/compat/linux/common/linux_signal.c:1.78 Mon Feb 20 16:26:30 2017 +++ src/sys/compat/linux/common/linux_signal.c Mon Feb 20 16:30:41 2017 @@ -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 @@ linux_sys_rt_sigaction(struct lwp *l, co #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 @@ linux_sys_rt_sigaction(struct lwp *l, co 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 @@ linux_sys_rt_sigaction(struct lwp *l, co 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 @@ linux_sys_rt_sigaction(struct lwp *l, co error = copyout(&olsa, SCARG(uap, osa), sizeof(olsa)); if (error) - return (error); + return error; } - return (0); + return 0; } int @@ -404,13 +404,13 @@ linux_sigprocmask1(struct lwp *l, int ho 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 @@ linux_sigprocmask1(struct lwp *l, int ho 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 @@ linux_sys_rt_sigprocmask(struct lwp *l, 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 @@ linux_sys_rt_sigprocmask(struct lwp *l, how = SIG_SETMASK; break; default: - return (EINVAL); + return EINVAL; } set = SCARG(uap, set); @@ -466,7 +466,7 @@ linux_sys_rt_sigprocmask(struct lwp *l, 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 @@ linux_sys_rt_sigprocmask(struct lwp *l, native_to_linux_sigset(&olss, &obss); error = copyout(&olss, oset, sizeof(olss)); } - return (error); + return error; } int @@ -491,7 +491,7 @@ linux_sys_rt_sigpending(struct lwp *l, c 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 @@ linux_sys_sigsuspend(struct lwp *l, cons 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 @@ linux_sys_rt_sigsuspend(struct lwp *l, c 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 @@ linux_sys_rt_queueinfo(struct lwp *l, co /* 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 @@ linux_sys_kill(struct lwp *l, const stru 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); }