Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gen Remove paranthesis from return operands.
details: https://anonhg.NetBSD.org/src/rev/204d520e6c2a
branches: trunk
changeset: 326553:204d520e6c2a
user: martin <martin%NetBSD.org@localhost>
date: Sun Feb 02 14:54:39 2014 +0000
description:
Remove paranthesis from return operands.
diffstat:
lib/libc/gen/posix_spawn_fileactions.c | 38 +++++++++++++++++-----------------
lib/libc/gen/posix_spawn_sched.c | 30 +++++++++++++-------------
2 files changed, 34 insertions(+), 34 deletions(-)
diffs (276 lines):
diff -r c990fed753d2 -r 204d520e6c2a lib/libc/gen/posix_spawn_fileactions.c
--- a/lib/libc/gen/posix_spawn_fileactions.c Sun Feb 02 14:50:46 2014 +0000
+++ b/lib/libc/gen/posix_spawn_fileactions.c Sun Feb 02 14:54:39 2014 +0000
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: posix_spawn_fileactions.c,v 1.3 2014/02/02 14:48:57 martin Exp $");
+__RCSID("$NetBSD: posix_spawn_fileactions.c,v 1.4 2014/02/02 14:54:39 martin Exp $");
#include "namespace.h"
@@ -48,15 +48,15 @@
posix_spawn_file_actions_init(posix_spawn_file_actions_t *fa)
{
if (fa == NULL)
- return (EINVAL);
+ return EINVAL;
fa->fae = malloc(MIN_SIZE * sizeof(struct posix_spawn_file_actions_entry));
if (fa->fae == NULL)
- return (ENOMEM);
+ return ENOMEM;
fa->size = MIN_SIZE;
fa->len = 0;
- return (0);
+ return 0;
}
int
@@ -65,7 +65,7 @@
unsigned int i;
if (fa == NULL)
- return (EINVAL);
+ return EINVAL;
for (i = 0; i < fa->len; i++) {
if (fa->fae[i].fae_action == FAE_OPEN)
@@ -73,7 +73,7 @@
}
free(fa->fae);
- return (0);
+ return 0;
}
static int
@@ -83,21 +83,21 @@
posix_spawn_file_actions_entry_t *fae;
if (fa == NULL)
- return (EINVAL);
+ return EINVAL;
if (fa->len < fa->size)
goto out;
fae = realloc(fa->fae, (fa->size + MIN_SIZE) * sizeof(*fa->fae));
if (fae == NULL)
- return (ENOMEM);
+ return ENOMEM;
fa->fae = fae;
fa->size += MIN_SIZE;
out:
*i = fa->len;
- return (0);
+ return 0;
}
int
@@ -109,15 +109,15 @@
int error;
if (fildes < 0)
- return (EBADF);
+ return EBADF;
error = posix_spawn_file_actions_getentry(fa, &i);
if (error)
- return (error);
+ return error;
faepath = strdup(path);
if (faepath == NULL)
- return (ENOMEM);
+ return ENOMEM;
fa->fae[i].fae_action = FAE_OPEN;
fa->fae[i].fae_path = faepath;
@@ -126,7 +126,7 @@
fa->fae[i].fae_mode = mode;
fa->len++;
- return (0);
+ return 0;
}
int
@@ -137,18 +137,18 @@
int error;
if (fildes < 0 || newfildes < 0)
- return (EBADF);
+ return EBADF;
error = posix_spawn_file_actions_getentry(fa, &i);
if (error)
- return (error);
+ return error;
fa->fae[i].fae_action = FAE_DUP2;
fa->fae[i].fae_fildes = fildes;
fa->fae[i].fae_newfildes = newfildes;
fa->len++;
- return (0);
+ return 0;
}
int
@@ -159,15 +159,15 @@
int error;
if (fildes < 0)
- return (EBADF);
+ return EBADF;
error = posix_spawn_file_actions_getentry(fa, &i);
if (error)
- return (error);
+ return error;
fa->fae[i].fae_action = FAE_CLOSE;
fa->fae[i].fae_fildes = fildes;
fa->len++;
- return (0);
+ return 0;
}
diff -r c990fed753d2 -r 204d520e6c2a lib/libc/gen/posix_spawn_sched.c
--- a/lib/libc/gen/posix_spawn_sched.c Sun Feb 02 14:50:46 2014 +0000
+++ b/lib/libc/gen/posix_spawn_sched.c Sun Feb 02 14:54:39 2014 +0000
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: posix_spawn_sched.c,v 1.1 2012/02/11 23:31:24 martin Exp $");
+__RCSID("$NetBSD: posix_spawn_sched.c,v 1.2 2014/02/02 14:54:39 martin Exp $");
#include "namespace.h"
@@ -49,7 +49,7 @@
return -1;
memset(ret, 0, sizeof(posix_spawnattr_t));
- return (0);
+ return 0;
}
int
@@ -58,7 +58,7 @@
if (sa == NULL)
return -1;
- return (0);
+ return 0;
}
int
@@ -66,7 +66,7 @@
short * __restrict flags)
{
*flags = sa->sa_flags;
- return (0);
+ return 0;
}
int
@@ -74,7 +74,7 @@
pid_t * __restrict pgroup)
{
*pgroup = sa->sa_pgroup;
- return (0);
+ return 0;
}
int
@@ -82,7 +82,7 @@
struct sched_param * __restrict schedparam)
{
*schedparam = sa->sa_schedparam;
- return (0);
+ return 0;
}
int
@@ -90,7 +90,7 @@
int * __restrict schedpolicy)
{
*schedpolicy = sa->sa_schedpolicy;
- return (0);
+ return 0;
}
int
@@ -98,7 +98,7 @@
sigset_t * __restrict sigdefault)
{
*sigdefault = sa->sa_sigdefault;
- return (0);
+ return 0;
}
int
@@ -106,21 +106,21 @@
sigset_t * __restrict sigmask)
{
*sigmask = sa->sa_sigmask;
- return (0);
+ return 0;
}
int
posix_spawnattr_setflags(posix_spawnattr_t *sa, short flags)
{
sa->sa_flags = flags;
- return (0);
+ return 0;
}
int
posix_spawnattr_setpgroup(posix_spawnattr_t *sa, pid_t pgroup)
{
sa->sa_pgroup = pgroup;
- return (0);
+ return 0;
}
int
@@ -128,14 +128,14 @@
const struct sched_param * __restrict schedparam)
{
sa->sa_schedparam = *schedparam;
- return (0);
+ return 0;
}
int
posix_spawnattr_setschedpolicy(posix_spawnattr_t *sa, int schedpolicy)
{
sa->sa_schedpolicy = schedpolicy;
- return (0);
+ return 0;
}
int
@@ -143,7 +143,7 @@
const sigset_t * __restrict sigdefault)
{
sa->sa_sigdefault = *sigdefault;
- return (0);
+ return 0;
}
int
@@ -151,5 +151,5 @@
const sigset_t * __restrict sigmask)
{
sa->sa_sigmask = *sigmask;
- return (0);
+ return 0;
}
Home |
Main Index |
Thread Index |
Old Index