Linuxulator: apply style(9) to return

Sponsored by:	Turing Robotic Industries Inc.
This commit is contained in:
emaste 2018-03-12 15:35:24 +00:00
parent 49fbeddce5
commit ac81b47ca6
6 changed files with 20 additions and 20 deletions

View File

@ -385,7 +385,7 @@ linux_to_bsd_speed(int code, struct speedtab *table)
for ( ; table->sp_code != -1; table++)
if (table->sp_code == code)
return (table->sp_speed);
return -1;
return (-1);
}
static int
@ -394,7 +394,7 @@ bsd_to_linux_speed(int speed, struct speedtab *table)
for ( ; table->sp_speed != -1; table++)
if (table->sp_speed == speed)
return (table->sp_code);
return -1;
return (-1);
}
static void
@ -2668,7 +2668,7 @@ static int
linux_ioctl_drm(struct thread *td, struct linux_ioctl_args *args)
{
args->cmd = SETDIR(args->cmd);
return sys_ioctl(td, (struct ioctl_args *)args);
return (sys_ioctl(td, (struct ioctl_args *)args));
}
#ifdef COMPAT_LINUX32
@ -3275,9 +3275,9 @@ linux_to_bsd_v4l2_format(struct l_v4l2_format *lvf, struct v4l2_format *vf)
* XXX TODO - needs 32 -> 64 bit conversion:
* (unused by webcams?)
*/
return EINVAL;
return (EINVAL);
memcpy(&vf->fmt, &lvf->fmt, sizeof(vf->fmt));
return 0;
return (0);
}
static int
@ -3293,9 +3293,9 @@ bsd_to_linux_v4l2_format(struct v4l2_format *vf, struct l_v4l2_format *lvf)
* XXX TODO - needs 32 -> 64 bit conversion:
* (unused by webcams?)
*/
return EINVAL;
return (EINVAL);
memcpy(&lvf->fmt, &vf->fmt, sizeof(vf->fmt));
return 0;
return (0);
}
static int
linux_ioctl_v4l2(struct thread *td, struct linux_ioctl_args *args)
@ -3315,7 +3315,7 @@ linux_ioctl_v4l2(struct thread *td, struct linux_ioctl_args *args)
case LINUX_VIDIOC_RESERVED:
case LINUX_VIDIOC_LOG_STATUS:
if ((args->cmd & IOC_DIRMASK) != LINUX_IOC_VOID)
return ENOIOCTL;
return (ENOIOCTL);
args->cmd = (args->cmd & 0xffff) | IOC_VOID;
break;

View File

@ -279,7 +279,7 @@ linux_rt_sigprocmask(struct thread *td, struct linux_rt_sigprocmask_args *args)
#endif
if (args->sigsetsize != sizeof(l_sigset_t))
return EINVAL;
return (EINVAL);
if (args->mask != NULL) {
error = copyin(args->mask, &set, sizeof(l_sigset_t));
@ -377,7 +377,7 @@ linux_rt_sigpending(struct thread *td, struct linux_rt_sigpending_args *args)
l_sigset_t lset;
if (args->sigsetsize > sizeof(lset))
return EINVAL;
return (EINVAL);
/* NOT REACHED */
#ifdef DEBUG

View File

@ -436,7 +436,7 @@ linux_statfs64(struct thread *td, struct linux_statfs64_args *args)
int error;
if (args->bufsize != sizeof(struct l_statfs64))
return EINVAL;
return (EINVAL);
LCONVPATHEXIST(td, args->path, &path);

View File

@ -116,7 +116,7 @@ linux_driver_get_name_dev(device_t dev)
const char *device_name = device_get_name(dev);
if (device_name == NULL)
return NULL;
return (NULL);
TAILQ_FOREACH(de, &devices, list) {
if (strcmp(device_name, de->entry.bsd_driver_name) == 0)
return (de->entry.linux_driver_name);
@ -133,7 +133,7 @@ linux_driver_get_major_minor(const char *node, int *major, int *minor)
size_t sz;
if (node == NULL || major == NULL || minor == NULL)
return 1;
return (1);
sz = sizeof("pts/") - 1;
if (strncmp(node, "pts/", sz) == 0 && node[sz] != '\0') {

View File

@ -69,7 +69,7 @@ exec_linux_imgact(struct image_params *imgp)
int error;
if (((a_out->a_magic >> 16) & 0xff) != 0x64)
return -1;
return (-1);
/*
* Set file/virtual offset based on a.out variant.

View File

@ -775,7 +775,7 @@ int
linux_mq_open(struct thread *td, struct linux_mq_open_args *args)
{
#ifdef P1003_1B_MQUEUE
return sys_kmq_open(td, (struct kmq_open_args *) args);
return (sys_kmq_open(td, (struct kmq_open_args *)args));
#else
return (ENOSYS);
#endif
@ -785,7 +785,7 @@ int
linux_mq_unlink(struct thread *td, struct linux_mq_unlink_args *args)
{
#ifdef P1003_1B_MQUEUE
return sys_kmq_unlink(td, (struct kmq_unlink_args *) args);
return (sys_kmq_unlink(td, (struct kmq_unlink_args *)args));
#else
return (ENOSYS);
#endif
@ -795,7 +795,7 @@ int
linux_mq_timedsend(struct thread *td, struct linux_mq_timedsend_args *args)
{
#ifdef P1003_1B_MQUEUE
return sys_kmq_timedsend(td, (struct kmq_timedsend_args *) args);
return (sys_kmq_timedsend(td, (struct kmq_timedsend_args *)args));
#else
return (ENOSYS);
#endif
@ -805,7 +805,7 @@ int
linux_mq_timedreceive(struct thread *td, struct linux_mq_timedreceive_args *args)
{
#ifdef P1003_1B_MQUEUE
return sys_kmq_timedreceive(td, (struct kmq_timedreceive_args *) args);
return (sys_kmq_timedreceive(td, (struct kmq_timedreceive_args *)args));
#else
return (ENOSYS);
#endif
@ -815,7 +815,7 @@ int
linux_mq_notify(struct thread *td, struct linux_mq_notify_args *args)
{
#ifdef P1003_1B_MQUEUE
return sys_kmq_notify(td, (struct kmq_notify_args *) args);
return (sys_kmq_notify(td, (struct kmq_notify_args *)args));
#else
return (ENOSYS);
#endif
@ -825,7 +825,7 @@ int
linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args)
{
#ifdef P1003_1B_MQUEUE
return sys_kmq_setattr(td, (struct kmq_setattr_args *) args);
return (sys_kmq_setattr(td, (struct kmq_setattr_args *)args));
#else
return (ENOSYS);
#endif