diff options
author | des <des@FreeBSD.org> | 2008-10-20 16:51:43 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2008-10-20 16:51:43 +0000 |
commit | ab560b681218dac9cd999387bdeb937c01ee1e9e (patch) | |
tree | 00e292d1d9214375d096c6e06cb5d94bedd2d44a /lib | |
parent | acbcfa5fb2a5926adcfc63feb08c0a0e895087fb (diff) | |
download | FreeBSD-src-ab560b681218dac9cd999387bdeb937c01ee1e9e.zip FreeBSD-src-ab560b681218dac9cd999387bdeb937c01ee1e9e.tar.gz |
Parenthesize return values.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libutil/login_class.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c index 8b1d9ab..94cb3aa 100644 --- a/lib/libutil/login_class.c +++ b/lib/libutil/login_class.c @@ -187,7 +187,7 @@ substvar(const char * var, const struct passwd * pwd, int hlen, int pch, int nle } } - return np; + return (np); } @@ -311,7 +311,7 @@ list2cpuset(const char *list, cpuset_t *mask) case DASH: return (0); } - return 1; + return (1); } @@ -370,7 +370,7 @@ setclasscontext(const char *classname, unsigned int flags) rc = lc ? setusercontext(lc, NULL, 0, flags) : -1; login_close(lc); - return rc; + return (rc); } @@ -400,7 +400,7 @@ setlogincontext(login_cap_t *lc, const struct passwd *pwd, if (flags & LOGIN_SETCPUMASK) setclasscpumask(lc); } - return mymask; + return (mymask); } @@ -470,13 +470,13 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in if (setgid(pwd->pw_gid) != 0) { syslog(LOG_ERR, "setgid(%lu): %m", (u_long)pwd->pw_gid); login_close(llc); - return -1; + return (-1); } if (initgroups(pwd->pw_name, pwd->pw_gid) == -1) { syslog(LOG_ERR, "initgroups(%s,%lu): %m", pwd->pw_name, (u_long)pwd->pw_gid); login_close(llc); - return -1; + return (-1); } } @@ -490,7 +490,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in if (mac_from_text(&label, label_string) == -1) { syslog(LOG_ERR, "mac_from_text('%s') for %s: %m", pwd->pw_name, label_string); - return -1; + return (-1); } if (mac_set_proc(label) == -1) error = errno; @@ -500,7 +500,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in if (error != 0) { syslog(LOG_ERR, "mac_set_proc('%s') for %s: %s", label_string, pwd->pw_name, strerror(error)); - return -1; + return (-1); } } } @@ -509,7 +509,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in if ((flags & LOGIN_SETLOGIN) && setlogin(pwd->pw_name) != 0) { syslog(LOG_ERR, "setlogin(%s): %m", pwd->pw_name); login_close(llc); - return -1; + return (-1); } mymask = (flags & LOGIN_SETUMASK) ? umask(LOGIN_DEFUMASK) : 0; @@ -519,7 +519,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in /* This needs to be done after anything that needs root privs */ if ((flags & LOGIN_SETUSER) && setuid(uid) != 0) { syslog(LOG_ERR, "setuid(%lu): %m", (u_long)uid); - return -1; /* Paranoia again */ + return (-1); /* Paranoia again */ } /* @@ -534,5 +534,5 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in if (flags & LOGIN_SETUMASK) umask(mymask); - return 0; + return (0); } |