Module Name: src Committed By: martin Date: Sun Feb 2 14:54:39 UTC 2014
Modified Files: src/lib/libc/gen: posix_spawn_fileactions.c posix_spawn_sched.c Log Message: Remove paranthesis from return operands. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/gen/posix_spawn_fileactions.c cvs rdiff -u -r1.1 -r1.2 src/lib/libc/gen/posix_spawn_sched.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/gen/posix_spawn_fileactions.c diff -u src/lib/libc/gen/posix_spawn_fileactions.c:1.3 src/lib/libc/gen/posix_spawn_fileactions.c:1.4 --- src/lib/libc/gen/posix_spawn_fileactions.c:1.3 Sun Feb 2 14:48:57 2014 +++ src/lib/libc/gen/posix_spawn_fileactions.c Sun Feb 2 14:54:39 2014 @@ -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 @@ 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_s 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_s } free(fa->fae); - return (0); + return 0; } static int @@ -83,21 +83,21 @@ posix_spawn_file_actions_getentry(posix_ 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_s 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_s fa->fae[i].fae_mode = mode; fa->len++; - return (0); + return 0; } int @@ -137,18 +137,18 @@ posix_spawn_file_actions_adddup2(posix_s 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_ 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; } Index: src/lib/libc/gen/posix_spawn_sched.c diff -u src/lib/libc/gen/posix_spawn_sched.c:1.1 src/lib/libc/gen/posix_spawn_sched.c:1.2 --- src/lib/libc/gen/posix_spawn_sched.c:1.1 Sat Feb 11 23:31:24 2012 +++ src/lib/libc/gen/posix_spawn_sched.c Sun Feb 2 14:54:39 2014 @@ -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 @@ posix_spawnattr_init(posix_spawnattr_t * return -1; memset(ret, 0, sizeof(posix_spawnattr_t)); - return (0); + return 0; } int @@ -58,7 +58,7 @@ posix_spawnattr_destroy(posix_spawnattr_ if (sa == NULL) return -1; - return (0); + return 0; } int @@ -66,7 +66,7 @@ posix_spawnattr_getflags(const posix_spa short * __restrict flags) { *flags = sa->sa_flags; - return (0); + return 0; } int @@ -74,7 +74,7 @@ posix_spawnattr_getpgroup(const posix_sp pid_t * __restrict pgroup) { *pgroup = sa->sa_pgroup; - return (0); + return 0; } int @@ -82,7 +82,7 @@ posix_spawnattr_getschedparam(const posi struct sched_param * __restrict schedparam) { *schedparam = sa->sa_schedparam; - return (0); + return 0; } int @@ -90,7 +90,7 @@ posix_spawnattr_getschedpolicy(const pos int * __restrict schedpolicy) { *schedpolicy = sa->sa_schedpolicy; - return (0); + return 0; } int @@ -98,7 +98,7 @@ posix_spawnattr_getsigdefault(const posi sigset_t * __restrict sigdefault) { *sigdefault = sa->sa_sigdefault; - return (0); + return 0; } int @@ -106,21 +106,21 @@ posix_spawnattr_getsigmask(const posix_s 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_spaw 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_spaw const sigset_t * __restrict sigdefault) { sa->sa_sigdefault = *sigdefault; - return (0); + return 0; } int @@ -151,5 +151,5 @@ posix_spawnattr_setsigmask(posix_spawnat const sigset_t * __restrict sigmask) { sa->sa_sigmask = *sigmask; - return (0); + return 0; }