bsd-user: style tweak: return is not a function, eliminate ()

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
This commit is contained in:
Warner Losh 2021-04-23 16:22:19 -06:00
parent cefbade173
commit fa0546370d
1 changed files with 6 additions and 7 deletions

View File

@ -28,7 +28,7 @@ static int count(char **vec)
vec++; vec++;
} }
return(i); return i;
} }
static int prepare_binprm(struct linux_binprm *bprm) static int prepare_binprm(struct linux_binprm *bprm)
@ -38,15 +38,15 @@ static int prepare_binprm(struct linux_binprm *bprm)
int retval; int retval;
if (fstat(bprm->fd, &st) < 0) { if (fstat(bprm->fd, &st) < 0) {
return(-errno); return -errno;
} }
mode = st.st_mode; mode = st.st_mode;
if (!S_ISREG(mode)) { /* Must be regular file */ if (!S_ISREG(mode)) { /* Must be regular file */
return(-EACCES); return -EACCES;
} }
if (!(mode & 0111)) { /* Must have at least one execute bit set */ if (!(mode & 0111)) { /* Must have at least one execute bit set */
return(-EACCES); return -EACCES;
} }
bprm->e_uid = geteuid(); bprm->e_uid = geteuid();
@ -75,10 +75,9 @@ static int prepare_binprm(struct linux_binprm *bprm)
if (retval < 0) { if (retval < 0) {
perror("prepare_binprm"); perror("prepare_binprm");
exit(-1); exit(-1);
/* return(-errno); */
} }
else { else {
return(retval); return retval;
} }
} }
@ -169,5 +168,5 @@ int loader_exec(const char *filename, char **argv, char **envp,
for (i = 0 ; i < MAX_ARG_PAGES ; i++) { for (i = 0 ; i < MAX_ARG_PAGES ; i++) {
g_free(bprm.page[i]); g_free(bprm.page[i]);
} }
return(retval); return retval;
} }