[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 15/48] bsd-user: style tweak: return is not a function, elimin
From: |
imp |
Subject: |
[PATCH v2 15/48] bsd-user: style tweak: return is not a function, eliminate () |
Date: |
Sat, 24 Apr 2021 09:59:43 -0600 |
From: Warner Losh <imp@bsdimp.com>
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
bsd-user/bsdload.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/bsd-user/bsdload.c b/bsd-user/bsdload.c
index 546946b91d..fd14ffa4cd 100644
--- a/bsd-user/bsdload.c
+++ b/bsd-user/bsdload.c
@@ -28,7 +28,7 @@ static int count(char **vec)
vec++;
}
- return(i);
+ return i;
}
static int prepare_binprm(struct linux_binprm *bprm)
@@ -38,15 +38,15 @@ static int prepare_binprm(struct linux_binprm *bprm)
int retval;
if (fstat(bprm->fd, &st) < 0) {
- return(-errno);
+ return -errno;
}
mode = st.st_mode;
if (!S_ISREG(mode)) { /* Must be regular file */
- return(-EACCES);
+ return -EACCES;
}
if (!(mode & 0111)) { /* Must have at least one execute bit set */
- return(-EACCES);
+ return -EACCES;
}
bprm->e_uid = geteuid();
@@ -75,10 +75,9 @@ static int prepare_binprm(struct linux_binprm *bprm)
if (retval < 0) {
perror("prepare_binprm");
exit(-1);
- /* return(-errno); */
}
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++) {
g_free(bprm.page[i]);
}
- return(retval);
+ return retval;
}
--
2.22.1
- [PATCH v2 06/48] bsd-user: style tweak: keyword space (, (continued)
- [PATCH v2 06/48] bsd-user: style tweak: keyword space (, imp, 2021/04/24
- [PATCH v2 07/48] bsd-user: style tweak: keyword space (, imp, 2021/04/24
- [PATCH v2 08/48] bsd-user: style tweak: use C not C++ comments, imp, 2021/04/24
- [PATCH v2 09/48] bsd-user: style tweak: use C not C++ comments, imp, 2021/04/24
- [PATCH v2 13/48] bsd-user: style tweak: Remove #if 0'd code, imp, 2021/04/24
- [PATCH v2 20/48] bsd-user: style tweak: use {} consistently in for / if / else statements, imp, 2021/04/24
- [PATCH v2 17/48] bsd-user: style tweak: Fix commentary issues, imp, 2021/04/24
- [PATCH v2 21/48] bsd-user: style nits: return is not a function, imp, 2021/04/24
- [PATCH v2 15/48] bsd-user: style tweak: return is not a function, eliminate (),
imp <=
- [PATCH v2 12/48] bsd-user: style tweak: Remove #if 0'd code, imp, 2021/04/24
- [PATCH v2 14/48] bsd-user: style tweak: Remove #if 0'd code, imp, 2021/04/24
- [PATCH v2 22/48] bsd-user: use qemu_strtoul in preference to strtol, imp, 2021/04/24
- [PATCH v2 10/48] bsd-user: Remove commented out code, imp, 2021/04/24
- [PATCH v2 24/48] bsd-user: create target_arch_cpu.h, imp, 2021/04/24