Module Name:    src
Committed By:   msaitoh
Date:           Tue Apr 23 07:45:07 UTC 2019

Modified Files:
        src/sys/compat/common: uipc_syscalls_40.c
        src/sys/compat/netbsd32: netbsd32_ioctl.c
        src/sys/compat/sunos: sunos_ioctl.c
        src/sys/compat/sunos32: sunos32_ioctl.c
        src/sys/compat/ultrix: ultrix_ioctl.c

Log Message:
 KNF. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/compat/common/uipc_syscalls_40.c
cvs rdiff -u -r1.101 -r1.102 src/sys/compat/netbsd32/netbsd32_ioctl.c
cvs rdiff -u -r1.68 -r1.69 src/sys/compat/sunos/sunos_ioctl.c
cvs rdiff -u -r1.34 -r1.35 src/sys/compat/sunos32/sunos32_ioctl.c
cvs rdiff -u -r1.37 -r1.38 src/sys/compat/ultrix/ultrix_ioctl.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/common/uipc_syscalls_40.c
diff -u src/sys/compat/common/uipc_syscalls_40.c:1.19 src/sys/compat/common/uipc_syscalls_40.c:1.20
--- src/sys/compat/common/uipc_syscalls_40.c:1.19	Thu Apr 18 17:45:12 2019
+++ src/sys/compat/common/uipc_syscalls_40.c	Tue Apr 23 07:45:06 2019
@@ -1,9 +1,9 @@
-/*	$NetBSD: uipc_syscalls_40.c,v 1.19 2019/04/18 17:45:12 christos Exp $	*/
+/*	$NetBSD: uipc_syscalls_40.c,v 1.20 2019/04/23 07:45:06 msaitoh Exp $	*/
 
 /* written by Pavel Cahyna, 2006. Public domain. */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.19 2019/04/18 17:45:12 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.20 2019/04/23 07:45:06 msaitoh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -29,10 +29,8 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall
 #include <compat/common/compat_mod.h>
 
 /*
- * Return interface configuration
- * of system.  List may be used
- * in later ioctl's (above) to get
- * other information.
+ * Return interface configuration of system.  List may be used in later
+ * ioctl's (above) to get other information.
  */
 /*ARGSUSED*/
 static int
@@ -158,7 +156,7 @@ compat_ifconf(u_long cmd, void *data)
 		ifc->ifc_len -= space;
 	else
 		ifc->ifc_len = -space;
-	return (0);
+	return 0;
 
 release_exit:
 	if_release(ifp, &psref);

Index: src/sys/compat/netbsd32/netbsd32_ioctl.c
diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.101 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.102
--- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.101	Sun Jan 27 02:08:40 2019
+++ src/sys/compat/netbsd32/netbsd32_ioctl.c	Tue Apr 23 07:45:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_ioctl.c,v 1.101 2019/01/27 02:08:40 pgoyette Exp $	*/
+/*	$NetBSD: netbsd32_ioctl.c,v 1.102 2019/04/23 07:45:06 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.101 2019/01/27 02:08:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.102 2019/04/23 07:45:06 msaitoh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ntp.h"
@@ -94,7 +94,8 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_ioc
 
 #if 0
 static inline void
-netbsd32_to_format_op(struct netbsd32_format_op *s32p, struct format_op *p, u_long cmd)
+netbsd32_to_format_op(struct netbsd32_format_op *s32p,
+    struct format_op *p, u_long cmd)
 {
 
 	p->df_buf = (char *)NETBSD32PTR64(s32p->df_buf);
@@ -142,8 +143,9 @@ netbsd32_to_oifreq(struct netbsd32_oifre
 
 static inline void
 netbsd32_to_if_addrprefreq(const struct netbsd32_if_addrprefreq *ifap32,
-	struct if_addrprefreq *ifap, u_long cmd)
+    struct if_addrprefreq *ifap, u_long cmd)
 {
+
 	strlcpy(ifap->ifap_name, ifap32->ifap_name, sizeof(ifap->ifap_name));
 	ifap->ifap_preference = ifap32->ifap_preference;
 	memcpy(&ifap->ifap_addr, &ifap32->ifap_addr,
@@ -160,7 +162,8 @@ netbsd32_to_ifconf(struct netbsd32_ifcon
 }
 
 static inline void
-netbsd32_to_ifmediareq(struct netbsd32_ifmediareq *s32p, struct ifmediareq *p, u_long cmd)
+netbsd32_to_ifmediareq(struct netbsd32_ifmediareq *s32p,
+    struct ifmediareq *p, u_long cmd)
 {
 
 	memcpy(p, s32p, sizeof *s32p);
@@ -211,7 +214,8 @@ netbsd32_to_ifdrv(struct netbsd32_ifdrv 
 }
 
 static inline void
-netbsd32_to_sioc_vif_req(struct netbsd32_sioc_vif_req *s32p, struct sioc_vif_req *p, u_long cmd)
+netbsd32_to_sioc_vif_req(struct netbsd32_sioc_vif_req *s32p,
+    struct sioc_vif_req *p, u_long cmd)
 {
 
 	p->vifi = s32p->vifi;
@@ -222,7 +226,8 @@ netbsd32_to_sioc_vif_req(struct netbsd32
 }
 
 static inline void
-netbsd32_to_sioc_sg_req(struct netbsd32_sioc_sg_req *s32p, struct sioc_sg_req *p, u_long cmd)
+netbsd32_to_sioc_sg_req(struct netbsd32_sioc_sg_req *s32p,
+    struct sioc_sg_req *p, u_long cmd)
 {
 
 	p->src = s32p->src;
@@ -235,6 +240,7 @@ netbsd32_to_sioc_sg_req(struct netbsd32_
 static inline void
 netbsd32_to_atareq(struct netbsd32_atareq *s32p, struct atareq *p, u_long cmd)
 {
+
 	p->flags = (u_long)s32p->flags;
 	p->command = s32p->command;
 	p->features = s32p->features;
@@ -250,7 +256,8 @@ netbsd32_to_atareq(struct netbsd32_atare
 }
 
 static inline void
-netbsd32_to_vnd_ioctl(struct netbsd32_vnd_ioctl *s32p, struct vnd_ioctl *p, u_long cmd)
+netbsd32_to_vnd_ioctl(struct netbsd32_vnd_ioctl *s32p,
+    struct vnd_ioctl *p, u_long cmd)
 {
 
 	p->vnd_file = (char *)NETBSD32PTR64(s32p->vnd_file);
@@ -261,7 +268,8 @@ netbsd32_to_vnd_ioctl(struct netbsd32_vn
 }
 
 static inline void
-netbsd32_to_vnd_user(struct netbsd32_vnd_user *s32p, struct vnd_user *p, u_long cmd)
+netbsd32_to_vnd_user(struct netbsd32_vnd_user *s32p,
+    struct vnd_user *p, u_long cmd)
 {
 
 	p->vnu_unit = s32p->vnu_unit;
@@ -270,7 +278,8 @@ netbsd32_to_vnd_user(struct netbsd32_vnd
 }
 
 static inline void
-netbsd32_to_vnd_ioctl50(struct netbsd32_vnd_ioctl50 *s32p, struct vnd_ioctl50 *p, u_long cmd)
+netbsd32_to_vnd_ioctl50(struct netbsd32_vnd_ioctl50 *s32p,
+    struct vnd_ioctl50 *p, u_long cmd)
 {
 
 	p->vnd_file = (char *)NETBSD32PTR64(s32p->vnd_file);
@@ -280,7 +289,8 @@ netbsd32_to_vnd_ioctl50(struct netbsd32_
 }
 
 static inline void
-netbsd32_to_plistref(struct netbsd32_plistref *s32p, struct plistref *p, u_long cmd)
+netbsd32_to_plistref(struct netbsd32_plistref *s32p,
+    struct plistref *p, u_long cmd)
 {
 
 	p->pref_plist = NETBSD32PTR64(s32p->pref_plist);
@@ -288,7 +298,8 @@ netbsd32_to_plistref(struct netbsd32_pli
 }
 
 static inline void
-netbsd32_to_nvlist_ref_t(netbsd32_nvlist_ref_t *s32p, nvlist_ref_t *p, u_long cmd)
+netbsd32_to_nvlist_ref_t(netbsd32_nvlist_ref_t *s32p,
+    nvlist_ref_t *p, u_long cmd)
 {
 
 	p->buf = NETBSD32PTR64(s32p->buf);
@@ -311,7 +322,8 @@ netbsd32_to_voidp(netbsd32_voidp *s32p, 
 }
 
 static inline void
-netbsd32_to_wdog_conf(struct netbsd32_wdog_conf *s32p, struct wdog_conf *p, u_long cmd)
+netbsd32_to_wdog_conf(struct netbsd32_wdog_conf *s32p,
+    struct wdog_conf *p, u_long cmd)
 {
 
 	p->wc_names = (char *)NETBSD32PTR64(s32p->wc_names);
@@ -319,10 +331,8 @@ netbsd32_to_wdog_conf(struct netbsd32_wd
 }
 
 static inline void
-netbsd32_to_npf_ioctl_table(
-    const struct netbsd32_npf_ioctl_table *s32p,
-    struct npf_ioctl_table *p,
-    u_long cmd)
+netbsd32_to_npf_ioctl_table(const struct netbsd32_npf_ioctl_table *s32p,
+    struct npf_ioctl_table *p, u_long cmd)
 {
 
        p->nct_cmd = s32p->nct_cmd;
@@ -341,7 +351,8 @@ netbsd32_to_npf_ioctl_table(
 }
 
 static inline void
-netbsd32_to_bpf_program(struct netbsd32_bpf_program *s32p, struct bpf_program *p, u_long cmd)
+netbsd32_to_bpf_program(struct netbsd32_bpf_program *s32p,
+    struct bpf_program *p, u_long cmd)
 {
 
 	p->bf_insns = (void *)NETBSD32PTR64(s32p->bf_insns);
@@ -349,7 +360,8 @@ netbsd32_to_bpf_program(struct netbsd32_
 }
 
 static inline void
-netbsd32_to_bpf_dltlist(struct netbsd32_bpf_dltlist *s32p, struct bpf_dltlist *p, u_long cmd)
+netbsd32_to_bpf_dltlist(struct netbsd32_bpf_dltlist *s32p,
+    struct bpf_dltlist *p, u_long cmd)
 {
 
 	p->bfl_list = (void *)NETBSD32PTR64(s32p->bfl_list);
@@ -358,10 +370,11 @@ netbsd32_to_bpf_dltlist(struct netbsd32_
 
 /* wsdisplay stuff */
 static inline void
-netbsd32_to_wsdisplay_addscreendata(struct netbsd32_wsdisplay_addscreendata *asd32,
-					       struct wsdisplay_addscreendata *asd,
-					       u_long cmd)
+netbsd32_to_wsdisplay_addscreendata(
+    struct netbsd32_wsdisplay_addscreendata *asd32,
+    struct wsdisplay_addscreendata *asd, u_long cmd)
 {
+
 	asd->screentype = (char *)NETBSD32PTR64(asd32->screentype);
 	asd->emul = (char *)NETBSD32PTR64(asd32->emul);
 	asd->idx = asd32->idx;
@@ -369,8 +382,9 @@ netbsd32_to_wsdisplay_addscreendata(stru
 
 static inline void
 netbsd32_to_ieee80211req(struct netbsd32_ieee80211req *ireq32,
-			 struct ieee80211req *ireq, u_long cmd)
+    struct ieee80211req *ireq, u_long cmd)
 {
+
 	strlcpy(ireq->i_name, ireq32->i_name, IFNAMSIZ);
 	ireq->i_type = ireq32->i_type;
 	ireq->i_val = ireq32->i_val;
@@ -380,8 +394,7 @@ netbsd32_to_ieee80211req(struct netbsd32
 
 static inline void
 netbsd32_to_ieee80211_nwkey(struct netbsd32_ieee80211_nwkey *nwk32,
-					       struct ieee80211_nwkey *nwk,
-					       u_long cmd)
+    struct ieee80211_nwkey *nwk, u_long cmd)
 {
 	int i;
 
@@ -397,9 +410,9 @@ netbsd32_to_ieee80211_nwkey(struct netbs
 
 static inline void
 netbsd32_to_wsdisplay_cursor(struct netbsd32_wsdisplay_cursor *c32,
-					       struct wsdisplay_cursor *c,
-					       u_long cmd)
+    struct wsdisplay_cursor *c, u_long cmd)
 {
+
 	c->which = c32->which;
 	c->enable = c32->enable;
 	c->pos.x = c32->pos.x;
@@ -419,9 +432,9 @@ netbsd32_to_wsdisplay_cursor(struct netb
 
 static inline void
 netbsd32_to_wsdisplay_cmap(struct netbsd32_wsdisplay_cmap *c32,
-					       struct wsdisplay_cmap *c,
-					       u_long cmd)
+    struct wsdisplay_cmap *c, u_long cmd)
 {
+
 	c->index = c32->index;
 	c->count = c32->count;
 	c->red   = NETBSD32PTR64(c32->red);
@@ -431,9 +444,9 @@ netbsd32_to_wsdisplay_cmap(struct netbsd
 
 static inline void
 netbsd32_to_wsdisplay_font(struct netbsd32_wsdisplay_font *f32,
-					       struct wsdisplay_font *f,
-					       u_long cmd)
+    struct wsdisplay_font *f, u_long cmd)
 {
+
 	f->name = NETBSD32PTR64(f32->name);
 	f->firstchar = f32->firstchar;
 	f->numchars = f32->numchars;
@@ -448,17 +461,16 @@ netbsd32_to_wsdisplay_font(struct netbsd
 
 static inline void
 netbsd32_to_wsdisplay_usefontdata(struct netbsd32_wsdisplay_usefontdata *f32,
-					       struct wsdisplay_usefontdata *f,
-					       u_long cmd)
+    struct wsdisplay_usefontdata *f, u_long cmd)
 {
+
 	f->name = NETBSD32PTR64(f32->name);
 }
 
 static inline void
 netbsd32_to_clockctl_settimeofday(
     const struct netbsd32_clockctl_settimeofday *s32p,
-    struct clockctl_settimeofday *p,
-    u_long cmd)
+    struct clockctl_settimeofday *p, u_long cmd)
 {
 
 	p->tv = NETBSD32PTR64(s32p->tv);
@@ -468,8 +480,7 @@ netbsd32_to_clockctl_settimeofday(
 static inline void
 netbsd32_to_clockctl_adjtime(
     const struct netbsd32_clockctl_adjtime *s32p,
-    struct clockctl_adjtime *p,
-    u_long cmd)
+    struct clockctl_adjtime *p, u_long cmd)
 {
 
 	p->delta = NETBSD32PTR64(s32p->delta);
@@ -479,8 +490,7 @@ netbsd32_to_clockctl_adjtime(
 static inline void
 netbsd32_to_clockctl_clock_settime(
     const struct netbsd32_clockctl_clock_settime *s32p,
-    struct clockctl_clock_settime *p,
-    u_long cmd)
+    struct clockctl_clock_settime *p, u_long cmd)
 {
 
 	p->clock_id = s32p->clock_id;
@@ -491,8 +501,7 @@ netbsd32_to_clockctl_clock_settime(
 static inline void
 netbsd32_to_clockctl_ntp_adjtime(
     const struct netbsd32_clockctl_ntp_adjtime *s32p,
-    struct clockctl_ntp_adjtime *p,
-    u_long cmd)
+    struct clockctl_ntp_adjtime *p, u_long cmd)
 {
 
 	p->tp = NETBSD32PTR64(s32p->tp);
@@ -501,42 +510,36 @@ netbsd32_to_clockctl_ntp_adjtime(
 #endif
 
 static inline void
-netbsd32_to_ksyms_gsymbol(
-    const struct netbsd32_ksyms_gsymbol *s32p,
-    struct ksyms_gsymbol *p,
-    u_long cmd)
+netbsd32_to_ksyms_gsymbol(const struct netbsd32_ksyms_gsymbol *s32p,
+    struct ksyms_gsymbol *p, u_long cmd)
 {
 
 	p->kg_name = NETBSD32PTR64(s32p->kg_name);
 }
 
 static inline void
-netbsd32_to_ksyms_gvalue(
-    const struct netbsd32_ksyms_gvalue *s32p,
-    struct ksyms_gvalue *p,
-    u_long cmd)
+netbsd32_to_ksyms_gvalue(const struct netbsd32_ksyms_gvalue *s32p,
+    struct ksyms_gvalue *p, u_long cmd)
 {
 
 	p->kv_name = NETBSD32PTR64(s32p->kv_name);
 }
 
 static inline void
-netbsd32_to_devlistargs(
-    const struct netbsd32_devlistargs *s32p,
-    struct devlistargs *p,
-    u_long cmd)
+netbsd32_to_devlistargs(const struct netbsd32_devlistargs *s32p,
+    struct devlistargs *p, u_long cmd)
 {
+
 	memcpy(p->l_devname, s32p->l_devname, sizeof(p->l_devname));
 	p->l_children = s32p->l_children;
 	p->l_childname = NETBSD32PTR64(s32p->l_childname);
 }
 
 static inline void
-netbsd32_to_devrescanargs(
-    const struct netbsd32_devrescanargs *s32p,
-    struct devrescanargs *p,
-    u_long cmd)
+netbsd32_to_devrescanargs(const struct netbsd32_devrescanargs *s32p,
+    struct devrescanargs *p, u_long cmd)
 {
+
 	memcpy(p->busname, s32p->busname, sizeof(p->busname));
 	memcpy(p->ifattr, s32p->ifattr, sizeof(p->ifattr));
 	p->numlocators = s32p->numlocators;
@@ -544,22 +547,20 @@ netbsd32_to_devrescanargs(
 }
 
 static inline void
-netbsd32_to_disk_strategy(
-    const struct netbsd32_disk_strategy *s32p,
-    struct disk_strategy *p,
-    u_long cmd)
+netbsd32_to_disk_strategy(const struct netbsd32_disk_strategy *s32p,
+    struct disk_strategy *p, u_long cmd)
 {
+
 	memcpy(p->dks_name, s32p->dks_name, sizeof(p->dks_name));
 	p->dks_param = NETBSD32PTR64(s32p->dks_param);
 	p->dks_paramlen = s32p->dks_paramlen;
 }
 
 static inline void
-netbsd32_to_dkwedge_list(
-    const struct netbsd32_dkwedge_list *s32p,
-    struct dkwedge_list *p,
-    u_long cmd)
+netbsd32_to_dkwedge_list(const struct netbsd32_dkwedge_list *s32p,
+    struct dkwedge_list *p, u_long cmd)
 {
+
 	p->dkwl_buf = NETBSD32PTR64(s32p->dkwl_buf);
 	p->dkwl_bufsize = s32p->dkwl_bufsize;
 	p->dkwl_nwedges = s32p->dkwl_nwedges;
@@ -572,7 +573,8 @@ netbsd32_to_dkwedge_list(
 
 #if 0
 static inline void
-netbsd32_from_format_op(struct format_op *p, struct netbsd32_format_op *s32p, u_long cmd)
+netbsd32_from_format_op(struct format_op *p,
+    struct netbsd32_format_op *s32p, u_long cmd)
 {
 
 /* filled in */
@@ -607,7 +609,8 @@ netbsd32_from_ifreq(struct ifreq *p, str
 }
 
 static inline void
-netbsd32_from_oifreq(struct oifreq *p, struct netbsd32_oifreq *s32p, u_long cmd)
+netbsd32_from_oifreq(struct oifreq *p,
+    struct netbsd32_oifreq *s32p, u_long cmd)
 {
 
 	/*
@@ -623,8 +626,9 @@ netbsd32_from_oifreq(struct oifreq *p, s
 
 static inline void
 netbsd32_from_if_addrprefreq(const struct if_addrprefreq *ifap,
-	struct netbsd32_if_addrprefreq *ifap32, u_long cmd)
+    struct netbsd32_if_addrprefreq *ifap32, u_long cmd)
 {
+
 	strlcpy(ifap32->ifap_name, ifap->ifap_name, sizeof(ifap32->ifap_name));
 	ifap32->ifap_preference = ifap->ifap_preference;
 	memcpy(&ifap32->ifap_addr, &ifap->ifap_addr,
@@ -632,7 +636,8 @@ netbsd32_from_if_addrprefreq(const struc
 }
 
 static inline void
-netbsd32_from_ifconf(struct ifconf *p, struct netbsd32_ifconf *s32p, u_long cmd)
+netbsd32_from_ifconf(struct ifconf *p,
+    struct netbsd32_ifconf *s32p, u_long cmd)
 {
 
 	s32p->ifc_len = p->ifc_len;
@@ -641,7 +646,8 @@ netbsd32_from_ifconf(struct ifconf *p, s
 }
 
 static inline void
-netbsd32_from_ifmediareq(struct ifmediareq *p, struct netbsd32_ifmediareq *s32p, u_long cmd)
+netbsd32_from_ifmediareq(struct ifmediareq *p,
+    struct netbsd32_ifmediareq *s32p, u_long cmd)
 {
 
 	memcpy(s32p, p, sizeof *p);
@@ -695,7 +701,8 @@ netbsd32_from_ifdrv(struct ifdrv *p, str
 }
 
 static inline void
-netbsd32_from_sioc_vif_req(struct sioc_vif_req *p, struct netbsd32_sioc_vif_req *s32p, u_long cmd)
+netbsd32_from_sioc_vif_req(struct sioc_vif_req *p,
+    struct netbsd32_sioc_vif_req *s32p, u_long cmd)
 {
 
 	s32p->vifi = p->vifi;
@@ -706,7 +713,8 @@ netbsd32_from_sioc_vif_req(struct sioc_v
 }
 
 static inline void
-netbsd32_from_sioc_sg_req(struct sioc_sg_req *p, struct netbsd32_sioc_sg_req *s32p, u_long cmd)
+netbsd32_from_sioc_sg_req(struct sioc_sg_req *p,
+    struct netbsd32_sioc_sg_req *s32p, u_long cmd)
 {
 
 	s32p->src = p->src;
@@ -717,8 +725,10 @@ netbsd32_from_sioc_sg_req(struct sioc_sg
 }
 
 static inline void
-netbsd32_from_atareq(struct atareq *p, struct netbsd32_atareq *s32p, u_long cmd)
+netbsd32_from_atareq(struct atareq *p,
+    struct netbsd32_atareq *s32p, u_long cmd)
 {
+
 	s32p->flags = (netbsd32_u_long)p->flags;
 	s32p->command = p->command;
 	s32p->features = p->features;
@@ -734,7 +744,8 @@ netbsd32_from_atareq(struct atareq *p, s
 }
 
 static inline void
-netbsd32_from_vnd_ioctl(struct vnd_ioctl *p, struct netbsd32_vnd_ioctl *s32p, u_long cmd)
+netbsd32_from_vnd_ioctl(struct vnd_ioctl *p,
+    struct netbsd32_vnd_ioctl *s32p, u_long cmd)
 {
 
 	s32p->vnd_flags = p->vnd_flags;
@@ -744,7 +755,8 @@ netbsd32_from_vnd_ioctl(struct vnd_ioctl
 }
 
 static inline void
-netbsd32_from_vnd_user(struct vnd_user *p, struct netbsd32_vnd_user *s32p, u_long cmd)
+netbsd32_from_vnd_user(struct vnd_user *p,
+    struct netbsd32_vnd_user *s32p, u_long cmd)
 {
 
 	s32p->vnu_unit = p->vnu_unit;
@@ -753,7 +765,8 @@ netbsd32_from_vnd_user(struct vnd_user *
 }
 
 static inline void
-netbsd32_from_vnd_ioctl50(struct vnd_ioctl50 *p, struct netbsd32_vnd_ioctl50 *s32p, u_long cmd)
+netbsd32_from_vnd_ioctl50(struct vnd_ioctl50 *p,
+    struct netbsd32_vnd_ioctl50 *s32p, u_long cmd)
 {
 
 	s32p->vnd_flags = p->vnd_flags;
@@ -762,7 +775,8 @@ netbsd32_from_vnd_ioctl50(struct vnd_ioc
 }
 
 static inline void
-netbsd32_from_plistref(struct plistref *p, struct netbsd32_plistref *s32p, u_long cmd)
+netbsd32_from_plistref(struct plistref *p,
+    struct netbsd32_plistref *s32p, u_long cmd)
 {
 
 	NETBSD32PTR32(s32p->pref_plist, p->pref_plist);
@@ -770,7 +784,8 @@ netbsd32_from_plistref(struct plistref *
 }
 
 static inline void
-netbsd32_from_nvlist_ref_t(nvlist_ref_t *p, netbsd32_nvlist_ref_t *s32p, u_long cmd)
+netbsd32_from_nvlist_ref_t(nvlist_ref_t *p,
+    netbsd32_nvlist_ref_t *s32p, u_long cmd)
 {
 
 	NETBSD32PTR32(s32p->buf, p->buf);
@@ -779,7 +794,8 @@ netbsd32_from_nvlist_ref_t(nvlist_ref_t 
 }
 
 static inline void
-netbsd32_from_wdog_conf(struct wdog_conf *p, struct netbsd32_wdog_conf *s32p, u_long cmd)
+netbsd32_from_wdog_conf(struct wdog_conf *p,
+    struct netbsd32_wdog_conf *s32p, u_long cmd)
 {
 
 	NETBSD32PTR32(s32p->wc_names, p->wc_names);
@@ -789,9 +805,9 @@ netbsd32_from_wdog_conf(struct wdog_conf
 /* wsdisplay stuff */
 static inline void
 netbsd32_from_wsdisplay_addscreendata(struct wsdisplay_addscreendata *asd,
-					struct netbsd32_wsdisplay_addscreendata *asd32,
-					u_long cmd)
+    struct netbsd32_wsdisplay_addscreendata *asd32, u_long cmd)
 {
+
 	NETBSD32PTR32(asd32->screentype, asd->screentype);
 	NETBSD32PTR32(asd32->emul, asd->emul);
 	asd32->idx = asd->idx;
@@ -799,9 +815,9 @@ netbsd32_from_wsdisplay_addscreendata(st
 
 static inline void
 netbsd32_from_wsdisplay_cursor(struct wsdisplay_cursor *c,
-					       struct netbsd32_wsdisplay_cursor *c32,
-					       u_long cmd)
+    struct netbsd32_wsdisplay_cursor *c32, u_long cmd)
 {
+
 	c32->which = c->which;
 	c32->enable = c->enable;
 	c32->pos.x = c->pos.x;
@@ -821,9 +837,9 @@ netbsd32_from_wsdisplay_cursor(struct ws
 
 static inline void
 netbsd32_from_wsdisplay_cmap(struct wsdisplay_cmap *c,
-					   struct netbsd32_wsdisplay_cmap *c32,
-					   u_long cmd)
+    struct netbsd32_wsdisplay_cmap *c32, u_long cmd)
 {
+
 	c32->index = c->index;
 	c32->count = c->count;
 	NETBSD32PTR32(c32->red, c->red);
@@ -833,22 +849,21 @@ netbsd32_from_wsdisplay_cmap(struct wsdi
 
 static inline void
 netbsd32_from_wsdisplay_font(struct wsdisplay_font *f,
-					struct netbsd32_wsdisplay_font *f32,
-					u_long cmd)
+    struct netbsd32_wsdisplay_font *f32, u_long cmd)
 {
 }
 
 static inline void
 netbsd32_from_wsdisplay_usefontdata(struct wsdisplay_usefontdata *f,
-					struct netbsd32_wsdisplay_usefontdata *f32,
-					u_long cmd)
+    struct netbsd32_wsdisplay_usefontdata *f32, u_long cmd)
 {
 }
 
 static inline void
 netbsd32_from_ieee80211req(struct ieee80211req *ireq,
-			   struct netbsd32_ieee80211req *ireq32, u_long cmd)
+    struct netbsd32_ieee80211req *ireq32, u_long cmd)
 {
+
 	strlcpy(ireq32->i_name, ireq->i_name, IFNAMSIZ);
 	ireq32->i_type = ireq->i_type;
 	ireq32->i_val = ireq->i_val;
@@ -858,8 +873,7 @@ netbsd32_from_ieee80211req(struct ieee80
 
 static inline void
 netbsd32_from_ieee80211_nwkey(struct ieee80211_nwkey *nwk,
-				struct netbsd32_ieee80211_nwkey *nwk32,
-				u_long cmd)
+    struct netbsd32_ieee80211_nwkey *nwk32, u_long cmd)
 {
 	int i;
 
@@ -874,7 +888,8 @@ netbsd32_from_ieee80211_nwkey(struct iee
 }
 
 static inline void
-netbsd32_from_bpf_program(struct bpf_program *p, struct netbsd32_bpf_program *s32p, u_long cmd)
+netbsd32_from_bpf_program(struct bpf_program *p,
+    struct netbsd32_bpf_program *s32p, u_long cmd)
 {
 
 	NETBSD32PTR32(s32p->bf_insns, p->bf_insns);
@@ -882,7 +897,8 @@ netbsd32_from_bpf_program(struct bpf_pro
 }
 
 static inline void
-netbsd32_from_bpf_dltlist(struct bpf_dltlist *p, struct netbsd32_bpf_dltlist *s32p, u_long cmd)
+netbsd32_from_bpf_dltlist(struct bpf_dltlist *p,
+    struct netbsd32_bpf_dltlist *s32p, u_long cmd)
 {
 
 	NETBSD32PTR32(s32p->bfl_list, p->bfl_list);
@@ -904,10 +920,8 @@ netbsd32_from_voidp(voidp *p, netbsd32_v
 }
 
 static inline void
-netbsd32_from_clockctl_settimeofday(
-    const struct clockctl_settimeofday *p,
-    struct netbsd32_clockctl_settimeofday *s32p,
-    u_long cmd)
+netbsd32_from_clockctl_settimeofday(const struct clockctl_settimeofday *p,
+    struct netbsd32_clockctl_settimeofday *s32p, u_long cmd)
 {
 
 	NETBSD32PTR32(s32p->tv, p->tv);
@@ -915,10 +929,8 @@ netbsd32_from_clockctl_settimeofday(
 }
 
 static inline void
-netbsd32_from_clockctl_adjtime(
-    const struct clockctl_adjtime *p,
-    struct netbsd32_clockctl_adjtime *s32p,
-    u_long cmd)
+netbsd32_from_clockctl_adjtime(const struct clockctl_adjtime *p,
+    struct netbsd32_clockctl_adjtime *s32p, u_long cmd)
 {
 
 	NETBSD32PTR32(s32p->delta, p->delta);
@@ -926,10 +938,8 @@ netbsd32_from_clockctl_adjtime(
 }
 
 static inline void
-netbsd32_from_clockctl_clock_settime(
-    const struct clockctl_clock_settime *p,
-    struct netbsd32_clockctl_clock_settime *s32p,
-    u_long cmd)
+netbsd32_from_clockctl_clock_settime(const struct clockctl_clock_settime *p,
+    struct netbsd32_clockctl_clock_settime *s32p, u_long cmd)
 {
 
 	s32p->clock_id = p->clock_id;
@@ -938,10 +948,8 @@ netbsd32_from_clockctl_clock_settime(
 
 #ifdef NTP
 static inline void
-netbsd32_from_clockctl_ntp_adjtime(
-    const struct clockctl_ntp_adjtime *p,
-    struct netbsd32_clockctl_ntp_adjtime *s32p,
-    u_long cmd)
+netbsd32_from_clockctl_ntp_adjtime(const struct clockctl_ntp_adjtime *p,
+    struct netbsd32_clockctl_ntp_adjtime *s32p, u_long cmd)
 {
 
 	NETBSD32PTR32(s32p->tp, p->tp);
@@ -950,10 +958,8 @@ netbsd32_from_clockctl_ntp_adjtime(
 #endif
 
 static inline void
-netbsd32_from_ksyms_gsymbol(
-    const struct ksyms_gsymbol *p,
-    struct netbsd32_ksyms_gsymbol *s32p,
-    u_long cmd)
+netbsd32_from_ksyms_gsymbol( const struct ksyms_gsymbol *p,
+    struct netbsd32_ksyms_gsymbol *s32p, u_long cmd)
 {
 
 	NETBSD32PTR32(s32p->kg_name, p->kg_name);
@@ -963,8 +969,7 @@ netbsd32_from_ksyms_gsymbol(
 static inline void
 netbsd32_from_ksyms_gvalue(
     const struct ksyms_gvalue *p,
-    struct netbsd32_ksyms_gvalue *s32p,
-    u_long cmd)
+    struct netbsd32_ksyms_gvalue *s32p, u_long cmd)
 {
 
 	NETBSD32PTR32(s32p->kv_name, p->kv_name);
@@ -972,10 +977,8 @@ netbsd32_from_ksyms_gvalue(
 }
 
 static inline void
-netbsd32_from_npf_ioctl_table(
-    const struct npf_ioctl_table *p,
-    struct netbsd32_npf_ioctl_table *s32p,
-    u_long cmd)
+netbsd32_from_npf_ioctl_table(const struct npf_ioctl_table *p,
+    struct netbsd32_npf_ioctl_table *s32p, u_long cmd)
 {
 
        s32p->nct_cmd = p->nct_cmd;
@@ -994,22 +997,20 @@ netbsd32_from_npf_ioctl_table(
 }
 
 static inline void
-netbsd32_from_devlistargs(
-    const struct devlistargs *p,
-    struct netbsd32_devlistargs *s32p,
-    u_long cmd)
+netbsd32_from_devlistargs(const struct devlistargs *p,
+    struct netbsd32_devlistargs *s32p, u_long cmd)
 {
+
 	memcpy(s32p->l_devname, p->l_devname, sizeof(s32p->l_devname));
 	s32p->l_children = p->l_children;
 	NETBSD32PTR32(s32p->l_childname, p->l_childname);
 }
 
 static inline void
-netbsd32_from_devrescanargs(
-    const struct devrescanargs *p,
-    struct netbsd32_devrescanargs *s32p,
-    u_long cmd)
+netbsd32_from_devrescanargs(const struct devrescanargs *p,
+    struct netbsd32_devrescanargs *s32p, u_long cmd)
 {
+
 	memcpy(s32p->busname, p->busname, sizeof(s32p->busname));
 	memcpy(s32p->ifattr, p->ifattr, sizeof(s32p->ifattr));
 	s32p->numlocators = p->numlocators;
@@ -1017,22 +1018,20 @@ netbsd32_from_devrescanargs(
 }
 
 static inline void
-netbsd32_from_disk_strategy(
-    const struct disk_strategy *p,
-    struct netbsd32_disk_strategy *s32p,
-    u_long cmd)
+netbsd32_from_disk_strategy(const struct disk_strategy *p,
+    struct netbsd32_disk_strategy *s32p, u_long cmd)
 {
+
 	memcpy(s32p->dks_name, p->dks_name, sizeof(p->dks_name));
 	NETBSD32PTR32(s32p->dks_param, p->dks_param);
 	s32p->dks_paramlen = p->dks_paramlen;
 }
 
 static inline void
-netbsd32_from_dkwedge_list(
-    const struct dkwedge_list *p,
-    struct netbsd32_dkwedge_list *s32p,
-    u_long cmd)
+netbsd32_from_dkwedge_list(const struct dkwedge_list *p,
+    struct netbsd32_dkwedge_list *s32p, u_long cmd)
 {
+
 	NETBSD32PTR32(s32p->dkwl_buf, p->dkwl_buf);
 	s32p->dkwl_bufsize = p->dkwl_bufsize;
 	s32p->dkwl_nwedges = p->dkwl_nwedges;
@@ -1053,7 +1052,7 @@ netbsd32_do_clockctl_ntp_adjtime(struct 
 
 	error = copyin(args->tp, &ntv32, sizeof(ntv32));
 	if (error)
-		return (error);
+		return error;
 
 	netbsd32_to_timex(&ntv32, &ntv);
 	(*vec_ntp_adjtime1)(&ntv);
@@ -1074,7 +1073,8 @@ netbsd32_do_clockctl_ntp_adjtime(struct 
  * on the ioctl command before and afterwards.
  */
 int
-netbsd32_ioctl(struct lwp *l, const struct netbsd32_ioctl_args *uap, register_t *retval)
+netbsd32_ioctl(struct lwp *l,
+    const struct netbsd32_ioctl_args *uap, register_t *retval)
 {
 	/* {
 		syscallarg(int) fd;
@@ -1126,7 +1126,7 @@ netbsd32_ioctl(struct lwp *l, const stru
 	fdp = p->p_fd;
 	fd = SCARG(uap, fd);
 	if ((fp = fd_getfile(fd)) == NULL)
-		return (EBADF);
+		return EBADF;
 	if ((fp->f_flag & (FREAD | FWRITE)) == 0) {
 		error = EBADF;
 		goto out;
@@ -1415,7 +1415,8 @@ netbsd32_ioctl(struct lwp *l, const stru
 #undef netbsd32_from_timeval
 
 	case WSDISPLAYIO_ADDSCREEN32:
-		IOCTL_STRUCT_CONV_TO(WSDISPLAYIO_ADDSCREEN, wsdisplay_addscreendata);
+		IOCTL_STRUCT_CONV_TO(WSDISPLAYIO_ADDSCREEN,
+		    wsdisplay_addscreendata);
 
 	case WSDISPLAYIO_GCURSOR32:
 		IOCTL_STRUCT_CONV_TO(WSDISPLAYIO_GCURSOR, wsdisplay_cursor);
@@ -1542,5 +1543,5 @@ netbsd32_ioctl(struct lwp *l, const stru
 	if (memp)
 		kmem_free(memp, size);
 	fd_putfile(fd);
-	return (error);
+	return error;
 }

Index: src/sys/compat/sunos/sunos_ioctl.c
diff -u src/sys/compat/sunos/sunos_ioctl.c:1.68 src/sys/compat/sunos/sunos_ioctl.c:1.69
--- src/sys/compat/sunos/sunos_ioctl.c:1.68	Sat Oct  8 15:48:07 2016
+++ src/sys/compat/sunos/sunos_ioctl.c	Tue Apr 23 07:45:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos_ioctl.c,v 1.68 2016/10/08 15:48:07 maxv Exp $	*/
+/*	$NetBSD: sunos_ioctl.c,v 1.69 2019/04/23 07:45:06 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1993 Markus Wild.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.68 2016/10/08 15:48:07 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.69 2019/04/23 07:45:06 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -392,7 +392,8 @@ stio2stios(struct sunos_termio *t, struc
 }
 
 int
-sunos_sys_ioctl(struct lwp *l, const struct sunos_sys_ioctl_args *uap, register_t *retval)
+sunos_sys_ioctl(struct lwp *l, const struct sunos_sys_ioctl_args *uap,
+    register_t *retval)
 {
 	/* {
 		int	fd;
@@ -467,7 +468,7 @@ sunos_sys_ioctl(struct lwp *l, const str
 		if ((error = (*ctl)(fp, TIOCGWINSZ, &ws)) != 0)
 			break;
 
-		if ((error = copyin (SCARG(uap, data), &ss, sizeof (ss))) != 0)
+		if ((error = copyin(SCARG(uap, data), &ss, sizeof(ss))) != 0)
 			break;
 
 		ws.ws_row = ss.ts_row;
@@ -487,7 +488,7 @@ sunos_sys_ioctl(struct lwp *l, const str
 		ss.ts_row = ws.ws_row;
 		ss.ts_col = ws.ws_col;
 
-		error = copyout((void *)&ss, SCARG(uap, data), sizeof (ss));
+		error = copyout((void *)&ss, SCARG(uap, data), sizeof(ss));
 		break;
 	    }
 	case _IOR('t', 119, int):	/* TIOCGPGRP */
@@ -546,10 +547,10 @@ sunos_sys_ioctl(struct lwp *l, const str
 		if (SCARG(uap, com) == SUNOS_TCGETA) {
 			stios2stio (&sts, &st);
 			error = copyout((void *)&st, SCARG(uap, data),
-			    sizeof (st));
+			    sizeof(st));
 		} else
 			error = copyout((void *)&sts, SCARG(uap, data),
-			    sizeof (sts));
+			    sizeof(sts));
 		break;
 	    }
 	case SUNOS_TCSETA:
@@ -560,7 +561,7 @@ sunos_sys_ioctl(struct lwp *l, const str
 		struct sunos_termios sts;
 		struct sunos_termio st;
 
-		if ((error = copyin(SCARG(uap, data), &st, sizeof (st))) != 0)
+		if ((error = copyin(SCARG(uap, data), &st, sizeof(st))) != 0)
 			break;
 
 		/* get full BSD termios so we don't lose information */
@@ -586,8 +587,8 @@ sunos_sys_ioctl(struct lwp *l, const str
 		struct termios bts;
 		struct sunos_termios sts;
 
-		if ((error = copyin (SCARG(uap, data), (void *)&sts,
-		    sizeof (sts))) != 0)
+		if ((error = copyin(SCARG(uap, data), (void *)&sts,
+		    sizeof(sts))) != 0)
 			break;
 		stios2btios (&sts, &bts);
 		error = (*ctl)(fp, SCARG(uap, com) - SUNOS_TCSETS + TIOCSETA,
@@ -600,7 +601,7 @@ sunos_sys_ioctl(struct lwp *l, const str
 	case _IOW('t', 32, int): {	/* TIOCTCNTL */
 		int on;
 
-		error = copyin (SCARG(uap, data), (void *)&on, sizeof (on));
+		error = copyin(SCARG(uap, data), (void *)&on, sizeof(on));
 		if (error)
 			break;
 		error = (*ctl)(fp, TIOCUCNTL, &on);
@@ -609,7 +610,7 @@ sunos_sys_ioctl(struct lwp *l, const str
 	case _IOW('t', 33, int): {	/* TIOCSIGNAL */
 		int sig;
 
-		error = copyin (SCARG(uap, data), (void *)&sig, sizeof (sig));
+		error = copyin(SCARG(uap, data), (void *)&sig, sizeof(sig));
 		if (error)
 			break;
 		error = (*ctl)(fp, TIOCSIG, &sig);
@@ -621,7 +622,7 @@ sunos_sys_ioctl(struct lwp *l, const str
  */
 #define IFREQ_IN(a) { \
 	struct oifreq ifreq; \
-	error = copyin (SCARG(uap, data), (void *)&ifreq, sizeof (ifreq)); \
+	error = copyin(SCARG(uap, data), (void *)&ifreq, sizeof(ifreq)); \
 	if (error) \
 		break; \
 	error = (*ctl)(fp, a, &ifreq); \
@@ -629,12 +630,12 @@ sunos_sys_ioctl(struct lwp *l, const str
 }
 #define IFREQ_INOUT(a) { \
 	struct oifreq ifreq; \
-	error = copyin (SCARG(uap, data), (void *)&ifreq, sizeof (ifreq)); \
+	error = copyin(SCARG(uap, data), (void *)&ifreq, sizeof(ifreq)); \
 	if (error) \
 		break; \
 	if ((error = (*ctl)(fp, a, &ifreq)) != 0) \
 		break; \
-	error = copyout ((void *)&ifreq, SCARG(uap, data), sizeof (ifreq)); \
+	error = copyout((void *)&ifreq, SCARG(uap, data), sizeof(ifreq)); \
 	break; \
 }
 
@@ -697,17 +698,18 @@ sunos_sys_ioctl(struct lwp *l, const str
 
 		/*
 		 * XXX: two more problems
-		 * 1. our sockaddr's are variable length, not always sizeof(sockaddr)
-		 * 2. this returns a name per protocol, ie. it returns two "lo0"'s
+		 * 1. our sockaddr's are variable length, not always
+		 *    sizeof(sockaddr)
+		 * 2. this returns a name per protocol, ie. it returns two
+		 *    "lo0"'s
 		 */
-		error = copyin (SCARG(uap, data), &ifc, sizeof (ifc));
+		error = copyin(SCARG(uap, data), &ifc, sizeof(ifc));
 		if (error)
 			break;
 		error = (*ctl)(fp, OOSIOCGIFCONF, &ifc);
 		if (error)
 			break;
-		error = copyout ((void *)&ifc, SCARG(uap, data),
-		    sizeof (ifc));
+		error = copyout((void *)&ifc, SCARG(uap, data), sizeof(ifc));
 		break;
 	    }
 
@@ -742,8 +744,8 @@ sunos_sys_ioctl(struct lwp *l, const str
 		/*XXX*/sunos_aui.reserved[2] = 0;
 		/*XXX*/sunos_aui.reserved[3] = 0;
 
-		error = copyout ((void *)&sunos_aui, SCARG(uap, data),
-				sizeof (sunos_aui));
+		error = copyout((void *)&sunos_aui, SCARG(uap, data),
+				sizeof(sunos_aui));
 		break;
 	    }
 
@@ -752,8 +754,8 @@ sunos_sys_ioctl(struct lwp *l, const str
 		struct audio_info aui;
 		struct sunos_audio_info sunos_aui;
 
-		error = copyin (SCARG(uap, data), (void *)&sunos_aui,
-		    sizeof (sunos_aui));
+		error = copyin(SCARG(uap, data), (void *)&sunos_aui,
+		    sizeof(sunos_aui));
 		if (error)
 			break;
 
@@ -796,8 +798,8 @@ sunos_sys_ioctl(struct lwp *l, const str
 	case _IOR('A', 4, int):	/* AUDIO_GETDEV */
 	    {
 		int devtype = SUNOS_AUDIO_DEV_AMD;
-		error = copyout ((void *)&devtype, SCARG(uap, data),
-				sizeof (devtype));
+		error = copyout((void *)&devtype, SCARG(uap, data),
+		    sizeof(devtype));
 		break;
 	    }
 
@@ -905,7 +907,7 @@ out:
 		SCARG(&pass_ua, data) = SCARG(uap, data);
 		error = sys_ioctl(l, &pass_ua, retval);
 	}
-	return (error);
+	return error;
 }
 
 /* SunOS fcntl(2) cmds not implemented */
@@ -1003,7 +1005,8 @@ static struct {
 };
 
 int
-sunos_sys_fcntl(struct lwp *l, const struct sunos_sys_fcntl_args *uap, register_t *retval)
+sunos_sys_fcntl(struct lwp *l, const struct sunos_sys_fcntl_args *uap,
+    register_t *retval)
 {
 	long flg;
 	int n, ret;
@@ -1040,7 +1043,8 @@ sunos_sys_fcntl(struct lwp *l, const str
 				return error;
 			sunos_to_bsd_flock(&ifl, &fl);
 
-			error = do_fcntl_lock(SCARG(uap, fd), SCARG(uap, cmd), &fl);
+			error = do_fcntl_lock(SCARG(uap, fd), SCARG(uap, cmd),
+			    &fl);
 			if (error)
 				return error;
 
@@ -1056,7 +1060,7 @@ sunos_sys_fcntl(struct lwp *l, const str
 	case SUN_F_RSETLK:
 	case SUN_F_CNVT:
 	case SUN_F_RSETLKW:
-		return (EOPNOTSUPP);
+		return EOPNOTSUPP;
 
 	default:
 		break;
@@ -1078,5 +1082,5 @@ sunos_sys_fcntl(struct lwp *l, const str
 		break;
 	}
 
-	return (ret);
+	return ret;
 }

Index: src/sys/compat/sunos32/sunos32_ioctl.c
diff -u src/sys/compat/sunos32/sunos32_ioctl.c:1.34 src/sys/compat/sunos32/sunos32_ioctl.c:1.35
--- src/sys/compat/sunos32/sunos32_ioctl.c:1.34	Fri Dec 11 08:10:43 2015
+++ src/sys/compat/sunos32/sunos32_ioctl.c	Tue Apr 23 07:45:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunos32_ioctl.c,v 1.34 2015/12/11 08:10:43 mlelstv Exp $	*/
+/*	$NetBSD: sunos32_ioctl.c,v 1.35 2019/04/23 07:45:06 msaitoh Exp $	*/
 /* from: NetBSD: sunos_ioctl.c,v 1.35 2001/02/03 22:20:02 mrg Exp 	*/
 
 /*
@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunos32_ioctl.c,v 1.34 2015/12/11 08:10:43 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos32_ioctl.c,v 1.35 2019/04/23 07:45:06 msaitoh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd32.h"
@@ -452,7 +452,8 @@ sunos32_do_ioctl(int fd, int cmd, void *
 }
 
 int
-sunos32_sys_ioctl(struct lwp *l, const struct sunos32_sys_ioctl_args *uap, register_t *retval)
+sunos32_sys_ioctl(struct lwp *l, const struct sunos32_sys_ioctl_args *uap,
+    register_t *retval)
 {
 	/* {
 		int	fd;
@@ -509,29 +510,34 @@ sunos32_sys_ioctl(struct lwp *l, const s
 		struct winsize ws;
 		struct sunos_ttysize ss;
 
-		if ((error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCGWINSZ, &ws, l)) != 0)
-			return (error);
+		error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCGWINSZ, &ws,
+		    l);
+		if (error != 0)
+			return error;
 
-		if ((error = copyin(SCARG_P32(uap, data), &ss, sizeof (ss))) != 0)
+		error = copyin(SCARG_P32(uap, data), &ss, sizeof(ss));
+		if (error != 0)
 			return error;
 
 		ws.ws_row = ss.ts_row;
 		ws.ws_col = ss.ts_col;
 
-		return (sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCSWINSZ, &ws, l));
+		return sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCSWINSZ, &ws, l);
 	    }
 	case _IOW('t', 38, struct sunos_ttysize):
 	    {
 		struct winsize ws;
 		struct sunos_ttysize ss;
 
-		if ((error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCGWINSZ, &ws, l)) != 0)
-			return (error);
+		error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCGWINSZ, &ws,
+		    l);
+		if (error != 0)
+			return error;
 
 		ss.ts_row = ws.ws_row;
 		ss.ts_col = ws.ws_col;
 
-		return copyout(&ss, SCARG_P32(uap, data), sizeof (ss));
+		return copyout(&ss, SCARG_P32(uap, data), sizeof(ss));
 	    }
 	case _IOW('t', 130, int):	/* TIOCSETPGRP: posix variant */
 		SCARG(&bsd_ua, com) = TIOCSPGRP;
@@ -543,9 +549,10 @@ sunos32_sys_ioctl(struct lwp *l, const s
 		 * (see also kern/tty_pty.c)
 		 */
 		int pgrp;
-		error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCGPGRP, &pgrp, l);
+		error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCGPGRP, &pgrp,
+		    l);
 		if (error)
-			return (error);
+			return error;
 		return copyout(&pgrp, SCARG_P32(uap, data), sizeof(pgrp));
 	    }
 	case _IO('t', 132):
@@ -558,17 +565,18 @@ sunos32_sys_ioctl(struct lwp *l, const s
 		struct sunos_termios sts;
 		struct sunos_termio st;
 
-		if ((error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCGETA, &bts, l)) != 0)
+		error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCGETA, &bts,
+		    l);
+		if (error != 0)
 			return error;
 
 		btios2stios (&bts, &sts);
 		if (SCARG(uap, com) == SUNOS_TCGETA) {
 			stios2stio (&sts, &st);
-			return copyout(&st, SCARG_P32(uap, data),
-			    sizeof (st));
+			return copyout(&st, SCARG_P32(uap, data), sizeof(st));
 		} else
 			return copyout(&sts, SCARG_P32(uap, data),
-			    sizeof (sts));
+			    sizeof(sts));
 		/*NOTREACHED*/
 	    }
 	case SUNOS_TCSETA:
@@ -580,11 +588,12 @@ sunos32_sys_ioctl(struct lwp *l, const s
 		struct sunos_termio st;
 
 		if ((error = copyin(SCARG_P32(uap, data), &st,
-		    sizeof (st))) != 0)
+		    sizeof(st))) != 0)
 			return error;
 
 		/* get full BSD termios so we don't lose information */
-		if ((error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCGETA, &bts, l)) != 0)
+		if ((error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCGETA,
+		    &bts, l)) != 0)
 			return error;
 
 		/*
@@ -595,8 +604,8 @@ sunos32_sys_ioctl(struct lwp *l, const s
 		stio2stios(&st, &sts);
 		stios2btios(&sts, &bts);
 
-		return sunos32_do_ioctl(SCARG(&bsd_ua, fd), SCARG(uap, com) - SUNOS_TCSETA + TIOCSETA,
-		    &bts, l);
+		return sunos32_do_ioctl(SCARG(&bsd_ua, fd),
+		    SCARG(uap, com) - SUNOS_TCSETA + TIOCSETA, &bts, l);
 	    }
 	case SUNOS_TCSETS:
 	case SUNOS_TCSETSW:
@@ -606,11 +615,11 @@ sunos32_sys_ioctl(struct lwp *l, const s
 		struct sunos_termios sts;
 
 		if ((error = copyin(SCARG_P32(uap, data), &sts,
-		    sizeof (sts))) != 0)
+		    sizeof(sts))) != 0)
 			return error;
 		stios2btios (&sts, &bts);
-		return sunos32_do_ioctl(SCARG(&bsd_ua, fd), SCARG(uap, com) - SUNOS_TCSETS + TIOCSETA,
-		    &bts, l);
+		return sunos32_do_ioctl(SCARG(&bsd_ua, fd),
+		    SCARG(uap, com) - SUNOS_TCSETS + TIOCSETA, &bts, l);
 	    }
 /*
  * Pseudo-tty ioctl translations.
@@ -618,7 +627,7 @@ sunos32_sys_ioctl(struct lwp *l, const s
 	case _IOW('t', 32, int): {	/* TIOCTCNTL */
 		int error1, on;
 
-		error1 = copyin(SCARG_P32(uap, data), &on, sizeof (on));
+		error1 = copyin(SCARG_P32(uap, data), &on, sizeof(on));
 		if (error1)
 			return error1;
 		return sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCUCNTL, &on, l);
@@ -626,7 +635,7 @@ sunos32_sys_ioctl(struct lwp *l, const s
 	case _IOW('t', 33, int): {	/* TIOCSIGNAL */
 		int error1, sig;
 
-		error1 = copyin(SCARG_P32(uap, data), &sig, sizeof (sig));
+		error1 = copyin(SCARG_P32(uap, data), &sig, sizeof(sig));
 		if (error1)
 			return error1;
 		return sunos32_do_ioctl(SCARG(&bsd_ua, fd), TIOCSIG, &sig, l);
@@ -637,19 +646,19 @@ sunos32_sys_ioctl(struct lwp *l, const s
  */
 #define IFREQ_IN(a) { \
 	struct oifreq ifreq; \
-	error = copyin(SCARG_P32(uap, data), &ifreq, sizeof (ifreq)); \
+	error = copyin(SCARG_P32(uap, data), &ifreq, sizeof(ifreq)); \
 	if (error) \
 		return error; \
 	return sunos32_do_ioctl(SCARG(&bsd_ua, fd), a, &ifreq, l); \
 }
 #define IFREQ_INOUT(a) { \
 	struct oifreq ifreq; \
-	error = copyin(SCARG_P32(uap, data), &ifreq, sizeof (ifreq)); \
+	error = copyin(SCARG_P32(uap, data), &ifreq, sizeof(ifreq)); \
 	if (error) \
 		return error; \
 	if ((error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), a, &ifreq, l)) != 0) \
 		return error; \
-	return copyout(&ifreq, SCARG_P32(uap, data), sizeof (ifreq)); \
+	return copyout(&ifreq, SCARG_P32(uap, data), sizeof(ifreq)); \
 }
 
 	case _IOW('i', 12, struct oifreq):
@@ -729,18 +738,19 @@ sunos32_sys_ioctl(struct lwp *l, const s
 
 		/*
 		 * XXX: two more problems
-		 * 1. our sockaddr's are variable length, not always sizeof(sockaddr)
-		 * 2. this returns a name per protocol, ie. it returns two "lo0"'s
+		 * 1. our sockaddr's are variable length, not always
+		 *    sizeof(sockaddr)
+		 * 2. this returns a name per protocol, ie. it returns two
+		 *    "lo0"'s
 		 */
-		error = copyin(SCARG_P32(uap, data), &ifcf,
-		    sizeof (ifcf));
+		error = copyin(SCARG_P32(uap, data), &ifcf, sizeof(ifcf));
 		if (error)
 			return error;
-		error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), OOSIOCGIFCONF, &ifcf, l);
+		error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), OOSIOCGIFCONF,
+		    &ifcf, l);
 		if (error)
 			return error;
-		return copyout(&ifcf, SCARG_P32(uap, data),
-		    sizeof (ifcf));
+		return copyout(&ifcf, SCARG_P32(uap, data), sizeof(ifcf));
 	    }
 
 /*
@@ -775,7 +785,7 @@ sunos32_sys_ioctl(struct lwp *l, const s
 		/*XXX*/sunos_aui.reserved[3] = 0;
 
 		return copyout(&sunos_aui, SCARG_P32(uap, data),
-				sizeof (sunos_aui));
+				sizeof(sunos_aui));
 	    }
 
 	case _IOWR('A', 2, struct sunos_audio_info):	/* AUDIO_SETINFO */
@@ -784,7 +794,7 @@ sunos32_sys_ioctl(struct lwp *l, const s
 		struct sunos_audio_info sunos_aui;
 
 		error = copyin(SCARG_P32(uap, data), &sunos_aui,
-		    sizeof (sunos_aui));
+		    sizeof(sunos_aui));
 		if (error)
 			return error;
 
@@ -815,19 +825,21 @@ sunos32_sys_ioctl(struct lwp *l, const s
 			 sunos_aui.record.active != (u_char)~0)
 			aui.record.pause = 1;
 
-		error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), AUDIO_SETINFO, &aui, l);
+		error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), AUDIO_SETINFO,
+		    &aui, l);
 		if (error)
 			return error;
 		/* Return new state */
 		goto sunos_au_getinfo;
 	    }
 	case _IO('A', 3):	/* AUDIO_DRAIN */
-		return sunos32_do_ioctl(SCARG(&bsd_ua, fd), AUDIO_DRAIN, NULL, l);
+		return sunos32_do_ioctl(SCARG(&bsd_ua, fd), AUDIO_DRAIN, NULL,
+		    l);
 	case _IOR('A', 4, int):	/* AUDIO_GETDEV */
 	    {
 		int devtype = SUNOS_AUDIO_DEV_AMD;
 		return copyout(&devtype, SCARG_P32(uap, data),
-				sizeof (devtype));
+		    sizeof(devtype));
 	    }
 
 /*
@@ -856,8 +868,7 @@ sunos32_sys_ioctl(struct lwp *l, const s
 	    {
 		int on = 1;
 		if (((intptr_t)SCARG_P32(uap, data) &
-			(SUNOS_S_HIPRI|SUNOS_S_INPUT)) ==
-		    SUNOS_S_HIPRI)
+		    (SUNOS_S_HIPRI|SUNOS_S_INPUT)) == SUNOS_S_HIPRI)
 			return EOPNOTSUPP;
                 return sunos32_do_ioctl(SCARG(&bsd_ua, fd), FIOASYNC, &on, l);
 	    }
@@ -870,9 +881,10 @@ sunos32_sys_ioctl(struct lwp *l, const s
             {
 		struct disklabel dl;
 
-		error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), DIOCGDINFO, &dl, l);
+		error = sunos32_do_ioctl(SCARG(&bsd_ua, fd), DIOCGDINFO,
+		    &dl, l);
 		if (error)
-			return (error);
+			return error;
 
 #define datageom	((struct sun_dkgeom *)SCARG_P32(uap, data))
 		/* XXX can't do memset() on a user address (dsl) */
@@ -921,7 +933,7 @@ sunos32_sys_ioctl(struct lwp *l, const s
 	    }
 
 	}
-	return (netbsd32_ioctl(l, &bsd_ua, retval));
+	return netbsd32_ioctl(l, &bsd_ua, retval);
 }
 
 /* SunOS fcntl(2) cmds not implemented */
@@ -965,10 +977,10 @@ bsd_to_sunos_flock(struct flock *iflp, s
 		break;
 	}
 
-	oflp->l_whence = (short) iflp->l_whence;
-	oflp->l_start = (netbsd32_long) iflp->l_start;
-	oflp->l_len = (netbsd32_long) iflp->l_len;
-	oflp->l_pid = (short) iflp->l_pid;
+	oflp->l_whence = (short)iflp->l_whence;
+	oflp->l_start = (netbsd32_long)iflp->l_start;
+	oflp->l_len = (netbsd32_long)iflp->l_len;
+	oflp->l_pid = (short)iflp->l_pid;
 	oflp->l_xxx = 0;
 }
 
@@ -1019,7 +1031,8 @@ static struct {
 };
 
 int
-sunos32_sys_fcntl(struct lwp *l, const struct sunos32_sys_fcntl_args *uap, register_t *retval)
+sunos32_sys_fcntl(struct lwp *l, const struct sunos32_sys_fcntl_args *uap,
+    register_t *retval)
 {
 	/* {
 		syscallarg(int) fd;
@@ -1060,7 +1073,8 @@ sunos32_sys_fcntl(struct lwp *l, const s
 				return error;
 			sunos_to_bsd_flock(&ifl, &fl);
 
-			error = do_fcntl_lock(SCARG(uap, fd), SCARG(uap, cmd), &fl);
+			error = do_fcntl_lock(SCARG(uap, fd), SCARG(uap, cmd),
+			    &fl);
 			if (error || SCARG(uap, cmd) != F_GETLK)
 				return error;
 
@@ -1072,7 +1086,7 @@ sunos32_sys_fcntl(struct lwp *l, const s
 	case SUN_F_RSETLK:
 	case SUN_F_CNVT:
 	case SUN_F_RSETLKW:
-		return (EOPNOTSUPP);
+		return EOPNOTSUPP;
 	}
 
 	ret = sys_fcntl(l, &bsd_ua, retval);

Index: src/sys/compat/ultrix/ultrix_ioctl.c
diff -u src/sys/compat/ultrix/ultrix_ioctl.c:1.37 src/sys/compat/ultrix/ultrix_ioctl.c:1.38
--- src/sys/compat/ultrix/ultrix_ioctl.c:1.37	Sat Oct  8 15:48:07 2016
+++ src/sys/compat/ultrix/ultrix_ioctl.c	Tue Apr 23 07:45:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ultrix_ioctl.c,v 1.37 2016/10/08 15:48:07 maxv Exp $ */
+/*	$NetBSD: ultrix_ioctl.c,v 1.38 2019/04/23 07:45:06 msaitoh Exp $ */
 /*	from : NetBSD: sunos_ioctl.c,v 1.21 1995/10/07 06:27:31 mycroft Exp */
 
 /*
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ultrix_ioctl.c,v 1.37 2016/10/08 15:48:07 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ultrix_ioctl.c,v 1.38 2019/04/23 07:45:06 msaitoh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_ultrix.h"
@@ -438,7 +438,9 @@ stio2stios(struct emul_termio *t, struct
 	ts->c_cflag = t->c_cflag;
 	ts->c_lflag = t->c_lflag;
 	ts->c_line  = t->c_line;
-	memcpy(ts->c_cc, t->c_cc, TERMIO_NCC); /* don't touch the upper fields! */
+
+	/* don't touch the upper fields! */
+	memcpy(ts->c_cc, t->c_cc, TERMIO_NCC);
 }
 
 static int
@@ -459,7 +461,8 @@ ultrix_do_ioctl(int fd, int cmd, void *a
 }
 
 int
-ultrix_sys_ioctl(struct lwp *l, const struct ultrix_sys_ioctl_args *uap, register_t *retval)
+ultrix_sys_ioctl(struct lwp *l, const struct ultrix_sys_ioctl_args *uap,
+    register_t *retval)
 {
 	struct sys_ioctl_args ap;
 	int error;
@@ -475,7 +478,8 @@ ultrix_sys_ioctl(struct lwp *l, const st
 	    {
 		int disc;
 
-		if ((error = copyin(SCARG(&ap, data), &disc, sizeof disc)) != 0)
+		error = copyin(SCARG(&ap, data), &disc, sizeof disc);
+		if (error != 0)
 			return error;
 
 		/* map SunOS NTTYDISC into our termios discipline */
@@ -509,10 +513,11 @@ ultrix_sys_ioctl(struct lwp *l, const st
 		struct winsize ws;
 		struct sunos_ttysize ss;
 
-		if ((error = ultrix_do_ioctl(SCARG(&ap, fd), TIOCGWINSZ, &ws, l)) != 0)
+		error = ultrix_do_ioctl(SCARG(&ap, fd), TIOCGWINSZ, &ws, l);
+		if (error != 0)
 			return error;
 
-		if ((error = copyin(SCARG(&ap, data), &ss, sizeof (ss))) != 0)
+		if ((error = copyin(SCARG(&ap, data), &ss, sizeof(ss))) != 0)
 			return error;
 
 		ws.ws_row = ss.ts_row;
@@ -525,13 +530,14 @@ ultrix_sys_ioctl(struct lwp *l, const st
 		struct winsize ws;
 		struct sunos_ttysize ss;
 
-		if ((error = ultrix_do_ioctl(SCARG(&ap, fd), TIOCGWINSZ, &ws, l)) != 0)
+		error = ultrix_do_ioctl(SCARG(&ap, fd), TIOCGWINSZ, &ws, l);
+		if (error != 0)
 			return error;
 
 		ss.ts_row = ws.ws_row;
 		ss.ts_col = ws.ws_col;
 
-		return copyout (&ss, SCARG(&ap, data), sizeof (ss));
+		return copyout(&ss, SCARG(&ap, data), sizeof(ss));
 	    }
 	case _IOW('t', 118, int):
 		SCARG(&ap, com) = TIOCSPGRP;
@@ -548,15 +554,16 @@ ultrix_sys_ioctl(struct lwp *l, const st
 		struct ultrix_termios sts;
 		struct ultrix_termio st;
 
-		if ((error = ultrix_do_ioctl(SCARG(&ap, fd), TIOCGETA, &bts, l)) != 0)
+		error = ultrix_do_ioctl(SCARG(&ap, fd), TIOCGETA, &bts, l);
+		if (error != 0)
 			return error;
 
 		btios2stios (&bts, &sts);
 		if (SCARG(&ap, com) == ULTRIX_TCGETA) {
 			stios2stio (&sts, &st);
-			return copyout(&st, SCARG(&ap, data), sizeof (st));
+			return copyout(&st, SCARG(&ap, data), sizeof(st));
 		} else
-			return copyout(&sts, SCARG(&ap, data), sizeof (sts));
+			return copyout(&sts, SCARG(&ap, data), sizeof(sts));
 		/*NOTREACHED*/
 	    }
 	/* Emulate termio tcset() */
@@ -569,11 +576,12 @@ ultrix_sys_ioctl(struct lwp *l, const st
 		struct ultrix_termio st;
 		int result;
 
-		if ((error = copyin(SCARG(&ap, data), &st, sizeof (st))) != 0)
+		if ((error = copyin(SCARG(&ap, data), &st, sizeof(st))) != 0)
 			return error;
 
 		/* get full BSD termios so we don't lose information */
-		if ((error = ultrix_do_ioctl(SCARG(&ap, fd), TIOCGETA, &bts, l)) != 0)
+		error = ultrix_do_ioctl(SCARG(&ap, fd), TIOCGETA, &bts, l);
+		if (error != 0)
 			return error;
 
 		/*
@@ -588,11 +596,11 @@ ultrix_sys_ioctl(struct lwp *l, const st
 		 * map ioctl code: ultrix tcsets are numbered in reverse order
 		 */
 #ifdef notyet
-		return ultrix_do_ioctl(SCARG(&ap, fd), ULTRIX_TCSETA - SCARG(&ap, com) + TIOCSETA,
-		    &bts, l);
+		return ultrix_do_ioctl(SCARG(&ap, fd),
+		    ULTRIX_TCSETA - SCARG(&ap, com) + TIOCSETA, &bts, l);
 #else
-		result= ultrix_do_ioctl(SCARG(&ap, fd), ULTRIX_TCSETA -  SCARG(&ap, com) + TIOCSETA,
-		    &bts, l);
+		result = ultrix_do_ioctl(SCARG(&ap, fd),
+		    ULTRIX_TCSETA - SCARG(&ap, com) + TIOCSETA, &bts, l);
 		printf("ultrix TCSETA %lx returns %d\n",
 		    ULTRIX_TCSETA - SCARG(&ap, com), result);
 		return result;
@@ -607,11 +615,12 @@ ultrix_sys_ioctl(struct lwp *l, const st
 		struct termios bts;
 		struct ultrix_termios sts;
 
-		if ((error = copyin(SCARG(&ap, data), &sts, sizeof (sts))) != 0)
+		error = copyin(SCARG(&ap, data), &sts, sizeof(sts));
+		if (error != 0)
 			return error;
 		stios2btios (&sts, &bts);
-		return ultrix_do_ioctl(SCARG(&ap, fd), ULTRIX_TCSETS - SCARG(&ap, com) + TIOCSETA,
-		    &bts, l);
+		return ultrix_do_ioctl(SCARG(&ap, fd),
+		    ULTRIX_TCSETS - SCARG(&ap, com) + TIOCSETA, &bts, l);
 	    }
 /*
  * Pseudo-tty ioctl translations.
@@ -619,7 +628,7 @@ ultrix_sys_ioctl(struct lwp *l, const st
 	case _IOW('t', 32, int): {	/* TIOCTCNTL */
 		int on;
 
-		error = copyin(SCARG(&ap, data), &on, sizeof (on));
+		error = copyin(SCARG(&ap, data), &on, sizeof(on));
 		if (error != 0)
 			return error;
 		return ultrix_do_ioctl(SCARG(&ap, fd), TIOCUCNTL, &on, l);
@@ -627,7 +636,7 @@ ultrix_sys_ioctl(struct lwp *l, const st
 	case _IOW('t', 33, int): {	/* TIOCSIGNAL */
 		int sig;
 
-		error = copyin(SCARG(&ap, data), &sig, sizeof (sig));
+		error = copyin(SCARG(&ap, data), &sig, sizeof(sig));
 		if (error != 0)
 			return error;
 		return ultrix_do_ioctl(SCARG(&ap, fd), TIOCSIG, &sig, l);
@@ -639,7 +648,7 @@ ultrix_sys_ioctl(struct lwp *l, const st
 #define IN_TYPE(a, type_t) { \
 	type_t localbuf; \
 	if ((error = copyin(SCARG(&ap, data), \
-				&localbuf, sizeof (type_t))) != 0) \
+				&localbuf, sizeof(type_t))) != 0) \
 		return error; \
 	return ultrix_do_ioctl(SCARG(&ap, fd), a, &localbuf, l); \
 }
@@ -647,28 +656,28 @@ ultrix_sys_ioctl(struct lwp *l, const st
 #define INOUT_TYPE(a, type_t) { \
 	type_t localbuf; \
 	if ((error = copyin(SCARG(&ap, data), &localbuf,	\
-			     sizeof (type_t))) != 0) \
+			     sizeof(type_t))) != 0) \
 		return error; \
 	if ((error = ultrix_do_ioctl(SCARG(&ap, fd), a, &localbuf, l)) != 0) \
 		return error; \
-	return copyout(&localbuf, SCARG(&ap, data), sizeof (type_t)); \
+	return copyout(&localbuf, SCARG(&ap, data), sizeof(type_t)); \
 }
 
 
 #define IFREQ_IN(a) { \
 	struct oifreq ifreq; \
-	if ((error = copyin(SCARG(&ap, data), &ifreq, sizeof (ifreq))) != 0) \
+	if ((error = copyin(SCARG(&ap, data), &ifreq, sizeof(ifreq))) != 0) \
 		return error; \
 	return ultrix_do_ioctl(SCARG(&ap, fd), a, &ifreq, l); \
 }
 
 #define IFREQ_INOUT(a) { \
 	struct oifreq ifreq; \
-	if ((error = copyin(SCARG(&ap, data), &ifreq, sizeof (ifreq))) != 0) \
+	if ((error = copyin(SCARG(&ap, data), &ifreq, sizeof(ifreq))) != 0) \
 		return error; \
 	if ((error = ultrix_do_ioctl(SCARG(&ap, fd), a, &ifreq, l)) != 0) \
 		return error; \
-	return copyout(&ifreq, SCARG(&ap, data), sizeof (ifreq)); \
+	return copyout(&ifreq, SCARG(&ap, data), sizeof(ifreq)); \
 }
 
 	case _IOW('i', 12, struct oifreq):
@@ -705,16 +714,23 @@ ultrix_sys_ioctl(struct lwp *l, const st
 
 		/*
 		 * XXX: two more problems
-		 * 1. our sockaddr's are variable length, not always sizeof(sockaddr)
-		 * 2. this returns a name per protocol, ie. it returns two "lo0"'s
+		 * 1. Our sockaddr's are variable length, not always
+		 *    sizeof(sockaddr)
+		 * 2. This returns a name per protocol, ie. it returns two
+		 *    "lo0"'s
 		 */
-		error = copyin(SCARG(&ap, data), &ifconfarg, sizeof (ifconfarg));
+		error = copyin(SCARG(&ap, data), &ifconfarg,
+		    sizeof(ifconfarg));
 		if (error)
 			return error;
-		error = ultrix_do_ioctl(SCARG(&ap, fd), OSIOCGIFCONF, &ifconfarg, l);
+
+		error = ultrix_do_ioctl(SCARG(&ap, fd), OSIOCGIFCONF,
+		    &ifconfarg, l);
 		if (error)
 			return error;
-		return copyout(&ifconfarg, SCARG(&ap, data), sizeof (ifconfarg));
+
+		return copyout(&ifconfarg, SCARG(&ap, data),
+		    sizeof(ifconfarg));
 	    }
 
 

Reply via email to