aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/imgact_aout.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2021-12-03 10:32:35 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2021-12-06 18:46:49 +0000
commit290e05dde058b50aec48464d7116a55c7417575e (patch)
tree8cbd41c1314373a4635f6124030cde347aa03b55 /sys/kern/imgact_aout.c
parentc210ef1347929cb3a0f46cdfdb3d4ad738e3af74 (diff)
downloadsrc-290e05dde058b50aec48464d7116a55c7417575e.tar.gz
src-290e05dde058b50aec48464d7116a55c7417575e.zip
imgact_aout.c: some style
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32960
Diffstat (limited to 'sys/kern/imgact_aout.c')
-rw-r--r--sys/kern/imgact_aout.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c
index 560803db4a86..5e0721254dd2 100644
--- a/sys/kern/imgact_aout.c
+++ b/sys/kern/imgact_aout.c
@@ -161,7 +161,7 @@ aout_fixup(uintptr_t *stack_base, struct image_params *imgp)
static int
exec_aout_imgact(struct image_params *imgp)
{
- const struct exec *a_out = (const struct exec *) imgp->image_header;
+ const struct exec *a_out;
struct vmspace *vmspace;
vm_map_t map;
vm_object_t object;
@@ -171,6 +171,8 @@ exec_aout_imgact(struct image_params *imgp)
unsigned long bss_size;
int error;
+ a_out = (const struct exec *)imgp->image_header;
+
/*
* Linux and *BSD binaries look very much alike,
* only the machine id is different:
@@ -180,7 +182,7 @@ exec_aout_imgact(struct image_params *imgp)
if (((a_out->a_midmag >> 16) & 0xff) != 0x86 &&
((a_out->a_midmag >> 16) & 0xff) != 0 &&
((((int)ntohl(a_out->a_midmag)) >> 16) & 0xff) != 0x86)
- return -1;
+ return (-1);
/*
* Set file/virtual offset based on a.out variant.