Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/netbsd32 KNF consistency: No parentheses are need...



details:   https://anonhg.NetBSD.org/src/rev/19f9dd6a4d67
branches:  trunk
changeset: 950175:19f9dd6a4d67
user:      simonb <simonb%NetBSD.org@localhost>
date:      Tue Jan 19 03:20:13 2021 +0000

description:
KNF consistency: No parentheses are needed around the return value.

diffstat:

 sys/compat/netbsd32/netbsd32_compat_09.c       |  14 ++--
 sys/compat/netbsd32/netbsd32_compat_10_sysv.c  |  32 ++++++------
 sys/compat/netbsd32/netbsd32_compat_12.c       |  24 ++++----
 sys/compat/netbsd32/netbsd32_compat_13.c       |  10 +-
 sys/compat/netbsd32/netbsd32_compat_14_sysv.c  |  18 +++---
 sys/compat/netbsd32/netbsd32_compat_20.c       |  12 ++--
 sys/compat/netbsd32/netbsd32_compat_30.c       |  40 +++++++-------
 sys/compat/netbsd32/netbsd32_compat_43.c       |  50 +++++++++---------
 sys/compat/netbsd32/netbsd32_compat_50.c       |  24 ++++----
 sys/compat/netbsd32/netbsd32_compat_50_quota.c |   6 +-
 sys/compat/netbsd32/netbsd32_compat_50_sysv.c  |   8 +-
 sys/compat/netbsd32/netbsd32_conv.h            |   6 +-
 sys/compat/netbsd32/netbsd32_exec_aout.c       |   8 +-
 sys/compat/netbsd32/netbsd32_fs.c              |  66 +++++++++++++-------------
 sys/compat/netbsd32/netbsd32_ipc.c             |  18 +++---
 sys/compat/netbsd32/netbsd32_rlimit.c          |   6 +-
 sys/compat/netbsd32/netbsd32_rndpseudo_50.c    |   6 +-
 sys/compat/netbsd32/netbsd32_signal.c          |  34 ++++++------
 sys/compat/netbsd32/netbsd32_socket.c          |  10 +-
 sys/compat/netbsd32/netbsd32_sysctl.c          |  16 +++---
 sys/compat/netbsd32/netbsd32_time.c            |  34 ++++++------
 21 files changed, 221 insertions(+), 221 deletions(-)

diffs (truncated from 1745 to 300 lines):

diff -r 337656586ac9 -r 19f9dd6a4d67 sys/compat/netbsd32/netbsd32_compat_09.c
--- a/sys/compat/netbsd32/netbsd32_compat_09.c  Tue Jan 19 02:40:07 2021 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_09.c  Tue Jan 19 03:20:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_compat_09.c,v 1.19 2019/01/27 02:08:40 pgoyette Exp $ */
+/*     $NetBSD: netbsd32_compat_09.c,v 1.20 2021/01/19 03:20:13 simonb Exp $   */
 
 /*
  * Copyright (c) 1998 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_09.c,v 1.19 2019/01/27 02:08:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_09.c,v 1.20 2021/01/19 03:20:13 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -59,8 +59,8 @@
        name[0] = CTL_KERN;
        name[1] = KERN_DOMAINNAME;
        sz = SCARG(uap, len);
-       return (old_sysctl(&name[0], 2,
-           (char *)SCARG_P32(uap, domainname), &sz, 0, 0, l));
+       return old_sysctl(&name[0], 2,
+           (char *)SCARG_P32(uap, domainname), &sz, 0, 0, l);
 }
 
 int
@@ -74,8 +74,8 @@
 
        name[0] = CTL_KERN;
        name[1] = KERN_DOMAINNAME;
-       return (old_sysctl(&name[0], 2, 0, 0,
-           (char *)SCARG_P32(uap, domainname), SCARG(uap, len), l));
+       return old_sysctl(&name[0], 2, 0, 0,
+           (char *)SCARG_P32(uap, domainname), SCARG(uap, len), l);
 }
 
 int
@@ -87,7 +87,7 @@
        struct compat_09_sys_uname_args ua;
 
        NETBSD32TOP_UAP(name, struct outsname);
-       return (compat_09_sys_uname(l, &ua, retval));
+       return compat_09_sys_uname(l, &ua, retval);
 }
 
 static struct syscall_package compat_netbsd32_09_syscalls[] = {
diff -r 337656586ac9 -r 19f9dd6a4d67 sys/compat/netbsd32/netbsd32_compat_10_sysv.c
--- a/sys/compat/netbsd32/netbsd32_compat_10_sysv.c     Tue Jan 19 02:40:07 2021 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_10_sysv.c     Tue Jan 19 03:20:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_compat_10_sysv.c,v 1.2 2019/01/27 02:08:40 pgoyette Exp $     */
+/*     $NetBSD: netbsd32_compat_10_sysv.c,v 1.3 2021/01/19 03:20:13 simonb Exp $       */
 
 /*
  * Copyright (c) 1994 Adam Glass and Charles M. Hannum.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_10_sysv.c,v 1.2 2019/01/27 02:08:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_10_sysv.c,v 1.3 2021/01/19 03:20:13 simonb Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sysv.h"
@@ -100,20 +100,20 @@
                SCARG(&semget_args, key) = SCARG(uap, a2);
                SCARG(&semget_args, nsems) = SCARG(uap, a3);
                SCARG(&semget_args, semflg) = SCARG(uap, a4);
-               return (sys_semget(l, &semget_args, retval));
+               return sys_semget(l, &semget_args, retval);
 
        case 2:                                         /* semop() */
                SCARG(&semop_args, semid) = SCARG(uap, a2);
                SCARG(&semop_args, sops) = NETBSD32IPTR64(SCARG(uap, a3));
                SCARG(&semop_args, nsops) = SCARG(uap, a4);
-               return (sys_semop(l, &semop_args, retval));
+               return sys_semop(l, &semop_args, retval);
 
        case 3:                                         /* semconfig() */
                SCARG(&semconfig_args, flag) = SCARG(uap, a2);
-               return (sys_semconfig(l, &semconfig_args, retval));
+               return sys_semconfig(l, &semconfig_args, retval);
 
        default:
-               return (EINVAL);
+               return EINVAL;
        }
 }
 #endif
@@ -152,26 +152,26 @@
                SCARG(&shmat_args, shmid) = SCARG(uap, a2);
                SCARG(&shmat_args, shmaddr) = NETBSD32IPTR64(SCARG(uap, a3));
                SCARG(&shmat_args, shmflg) = SCARG(uap, a4);
-               return (sys_shmat(l, &shmat_args, retval));
+               return sys_shmat(l, &shmat_args, retval);
 
        case 1:                                         /* shmctl() */
                SCARG(&shmctl_args, shmid) = SCARG(uap, a2);
                SCARG(&shmctl_args, cmd) = SCARG(uap, a3);
                SCARG(&shmctl_args, buf) = NETBSD32IPTR64(SCARG(uap, a4));
-               return (compat_14_sys_shmctl(l, &shmctl_args, retval));
+               return compat_14_sys_shmctl(l, &shmctl_args, retval);
 
        case 2:                                         /* shmdt() */
                SCARG(&shmdt_args, shmaddr) = NETBSD32IPTR64(SCARG(uap, a2));
-               return (sys_shmdt(l, &shmdt_args, retval));
+               return sys_shmdt(l, &shmdt_args, retval);
 
        case 3:                                         /* shmget() */
                SCARG(&shmget_args, key) = SCARG(uap, a2);
                SCARG(&shmget_args, size) = SCARG(uap, a3);
                SCARG(&shmget_args, shmflg) = SCARG(uap, a4);
-               return (sys_shmget(l, &shmget_args, retval));
+               return sys_shmget(l, &shmget_args, retval);
 
        default:
-               return (EINVAL);
+               return EINVAL;
        }
 }
 #endif
@@ -216,19 +216,19 @@
                SCARG(&msgctl_args, msqid) = SCARG(uap, a2);
                SCARG(&msgctl_args, cmd) = SCARG(uap, a3);
                SCARG(&msgctl_args, buf) = NETBSD32IPTR64(SCARG(uap, a4));
-               return (compat_14_sys_msgctl(l, &msgctl_args, retval));
+               return compat_14_sys_msgctl(l, &msgctl_args, retval);
 
        case 1:                                 /* msgget() */
                SCARG(&msgget_args, key) = SCARG(uap, a2);
                SCARG(&msgget_args, msgflg) = SCARG(uap, a3);
-               return (sys_msgget(l, &msgget_args, retval));
+               return sys_msgget(l, &msgget_args, retval);
 
        case 2:                                 /* msgsnd() */
                SCARG(&msgsnd_args, msqid) = SCARG(uap, a2);
                SCARG(&msgsnd_args, msgp) = NETBSD32IPTR64(SCARG(uap, a3));
                SCARG(&msgsnd_args, msgsz) = SCARG(uap, a4);
                SCARG(&msgsnd_args, msgflg) = SCARG(uap, a5);
-               return (sys_msgsnd(l, &msgsnd_args, retval));
+               return sys_msgsnd(l, &msgsnd_args, retval);
 
        case 3:                                 /* msgrcv() */
                SCARG(&msgrcv_args, msqid) = SCARG(uap, a2);
@@ -236,10 +236,10 @@
                SCARG(&msgrcv_args, msgsz) = SCARG(uap, a4);
                SCARG(&msgrcv_args, msgtyp) = SCARG(uap, a5);
                SCARG(&msgrcv_args, msgflg) = SCARG(uap, a6);
-               return (sys_msgrcv(l, &msgrcv_args, retval));
+               return sys_msgrcv(l, &msgrcv_args, retval);
 
        default:
-               return (EINVAL);
+               return EINVAL;
        }
 }
 #endif
diff -r 337656586ac9 -r 19f9dd6a4d67 sys/compat/netbsd32/netbsd32_compat_12.c
--- a/sys/compat/netbsd32/netbsd32_compat_12.c  Tue Jan 19 02:40:07 2021 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_12.c  Tue Jan 19 03:20:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_compat_12.c,v 1.34 2019/01/27 02:08:40 pgoyette Exp $ */
+/*     $NetBSD: netbsd32_compat_12.c,v 1.35 2021/01/19 03:20:13 simonb Exp $   */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.34 2019/01/27 02:08:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.35 2021/01/19 03:20:13 simonb Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -94,7 +94,7 @@
        struct compat_12_sys_reboot_args ua;
 
        NETBSD32TO64_UAP(opt);
-       return (compat_12_sys_reboot(l, &ua, retval));
+       return compat_12_sys_reboot(l, &ua, retval);
 }
 
 int
@@ -109,7 +109,7 @@
        NETBSD32TOP_UAP(addr, void *);
        NETBSD32TOX_UAP(len, size_t);
        SCARG(&ua, flags) = MS_SYNC | MS_INVALIDATE;
-       return (sys___msync13(l, &ua, retval));
+       return sys___msync13(l, &ua, retval);
 }
 
 int
@@ -123,7 +123,7 @@
        SCARG(&ua, cmd) = SWAP_ON;
        SCARG(&ua, arg) = SCARG_P32(uap, name);
        SCARG(&ua, misc) = 0;   /* priority */
-       return (sys_swapctl(l, &ua, retval));
+       return sys_swapctl(l, &ua, retval);
 }
 
 int
@@ -140,12 +140,12 @@
 
        error = do_sys_stat(SCARG_P32(uap, path), FOLLOW, &sb);
        if (error)
-               return (error);
+               return error;
 
        compat_12_stat_conv(&sb, &sb12);
        netbsd32_stat12_to_netbsd32(&sb12, &sb32);
 
-       return (copyout(&sb32, SCARG_P32(uap, ub), sizeof sb32));
+       return copyout(&sb32, SCARG_P32(uap, ub), sizeof sb32);
 }
 
 int
@@ -162,12 +162,12 @@
 
        error = do_sys_fstat(SCARG(uap, fd), &sb);
        if (error)
-               return (error);
+               return error;
 
        compat_12_stat_conv(&sb, &sb12);
        netbsd32_stat12_to_netbsd32(&sb12, &sb32);
 
-       return (copyout(&sb32, SCARG_P32(uap, sb), sizeof sb32));
+       return copyout(&sb32, SCARG_P32(uap, sb), sizeof sb32);
 }
 
 int
@@ -184,12 +184,12 @@
 
        error = do_sys_stat(SCARG_P32(uap, path), NOFOLLOW, &sb);
        if (error)
-               return (error);
+               return error;
 
        compat_12_stat_conv(&sb, &sb12);
        netbsd32_stat12_to_netbsd32(&sb12, &sb32);
 
-       return (copyout(&sb32, SCARG_P32(uap, ub), sizeof sb32));
+       return copyout(&sb32, SCARG_P32(uap, ub), sizeof sb32);
 }
 
 int
@@ -208,7 +208,7 @@
        NETBSD32TO64_UAP(count);
        NETBSD32TOP_UAP(basep, long);
 
-       return (compat_12_sys_getdirentries(l, &ua, retval));
+       return compat_12_sys_getdirentries(l, &ua, retval);
 }
 
 static struct syscall_package compat_netbsd32_12_syscalls[] = {
diff -r 337656586ac9 -r 19f9dd6a4d67 sys/compat/netbsd32/netbsd32_compat_13.c
--- a/sys/compat/netbsd32/netbsd32_compat_13.c  Tue Jan 19 02:40:07 2021 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_13.c  Tue Jan 19 03:20:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_compat_13.c,v 1.27 2019/01/27 02:08:40 pgoyette Exp $ */
+/*     $NetBSD: netbsd32_compat_13.c,v 1.28 2021/01/19 03:20:13 simonb Exp $   */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_13.c,v 1.27 2019/01/27 02:08:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_13.c,v 1.28 2021/01/19 03:20:13 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -74,10 +74,10 @@
        error = sigprocmask1(l, SCARG(uap, how), &nbss, &obss);
        mutex_exit(p->p_lock);
        if (error)
-               return (error);
+               return error;
        native_sigset_to_sigset13(&obss, &oess);
        *retval = oess;
-       return (0);
+       return 0;
 }
 
 int
@@ -91,7 +91,7 @@
 
        ess = SCARG(uap, mask);
        native_sigset13_to_sigset(&ess, &bss);
-       return (sigsuspend1(l, &bss));
+       return sigsuspend1(l, &bss);
 }
 
 static struct syscall_package compat_netbsd32_13_syscalls[] = {
diff -r 337656586ac9 -r 19f9dd6a4d67 sys/compat/netbsd32/netbsd32_compat_14_sysv.c



Home | Main Index | Thread Index | Old Index