diff --git a/lib/libc/gen/posix_spawn_fileactions.c b/lib/libc/gen/posix_spawn_fileactions.c index 062f67f07358..c19ab69dfc26 100644 --- a/lib/libc/gen/posix_spawn_fileactions.c +++ b/lib/libc/gen/posix_spawn_fileactions.c @@ -25,7 +25,7 @@ */ #include -__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 @@ int 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 @@ posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *fa) 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 @@ posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *fa) } free(fa->fae); - return (0); + return 0; } static int @@ -83,21 +83,21 @@ posix_spawn_file_actions_getentry(posix_spawn_file_actions_t *fa, 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 @@ posix_spawn_file_actions_addopen(posix_spawn_file_actions_t * __restrict fa, 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 @@ posix_spawn_file_actions_addopen(posix_spawn_file_actions_t * __restrict fa, fa->fae[i].fae_mode = mode; fa->len++; - return (0); + return 0; } int @@ -137,18 +137,18 @@ posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *fa, 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 @@ posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *fa, 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 --git a/lib/libc/gen/posix_spawn_sched.c b/lib/libc/gen/posix_spawn_sched.c index d3cc341a8e00..dc1dda9e7bb9 100644 --- a/lib/libc/gen/posix_spawn_sched.c +++ b/lib/libc/gen/posix_spawn_sched.c @@ -25,7 +25,7 @@ */ #include -__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 @@ posix_spawnattr_init(posix_spawnattr_t *ret) return -1; memset(ret, 0, sizeof(posix_spawnattr_t)); - return (0); + return 0; } int @@ -58,7 +58,7 @@ posix_spawnattr_destroy(posix_spawnattr_t *sa) if (sa == NULL) return -1; - return (0); + return 0; } int @@ -66,7 +66,7 @@ posix_spawnattr_getflags(const posix_spawnattr_t * __restrict sa, short * __restrict flags) { *flags = sa->sa_flags; - return (0); + return 0; } int @@ -74,7 +74,7 @@ posix_spawnattr_getpgroup(const posix_spawnattr_t * __restrict sa, pid_t * __restrict pgroup) { *pgroup = sa->sa_pgroup; - return (0); + return 0; } int @@ -82,7 +82,7 @@ posix_spawnattr_getschedparam(const posix_spawnattr_t * __restrict sa, struct sched_param * __restrict schedparam) { *schedparam = sa->sa_schedparam; - return (0); + return 0; } int @@ -90,7 +90,7 @@ posix_spawnattr_getschedpolicy(const posix_spawnattr_t * __restrict sa, int * __restrict schedpolicy) { *schedpolicy = sa->sa_schedpolicy; - return (0); + return 0; } int @@ -98,7 +98,7 @@ posix_spawnattr_getsigdefault(const posix_spawnattr_t * __restrict sa, sigset_t * __restrict sigdefault) { *sigdefault = sa->sa_sigdefault; - return (0); + return 0; } int @@ -106,21 +106,21 @@ posix_spawnattr_getsigmask(const posix_spawnattr_t * __restrict sa, 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 @@ posix_spawnattr_setschedparam(posix_spawnattr_t * __restrict sa, 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 @@ posix_spawnattr_setsigdefault(posix_spawnattr_t * __restrict sa, const sigset_t * __restrict sigdefault) { sa->sa_sigdefault = *sigdefault; - return (0); + return 0; } int @@ -151,5 +151,5 @@ posix_spawnattr_setsigmask(posix_spawnattr_t * __restrict sa, const sigset_t * __restrict sigmask) { sa->sa_sigmask = *sigmask; - return (0); + return 0; }