From ee0990090dc3e324f878acc86eee8edabf147ec7 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 26 Nov 2002 23:11:25 -0800 Subject: LSM: change if statements into something more readable for the fs/* files. --- fs/exec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'fs/exec.c') diff --git a/fs/exec.c b/fs/exec.c index 3757201478c3..a0a4aa824ae6 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -841,7 +841,8 @@ int prepare_binprm(struct linux_binprm *bprm) } /* fill in binprm security blob */ - if ((retval = security_bprm_set(bprm))) + retval = security_bprm_set(bprm); + if (retval) return retval; memset(bprm->buf,0,BINPRM_BUF_SIZE); @@ -958,7 +959,8 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) } } #endif - if ((retval = security_bprm_check(bprm))) + retval = security_bprm_check(bprm); + if (retval) return retval; /* kernel module loader fixup */ @@ -1054,7 +1056,8 @@ int do_execve(char * filename, char ** argv, char ** envp, struct pt_regs * regs if ((retval = bprm.envc) < 0) goto out_mm; - if ((retval = security_bprm_alloc(&bprm))) + retval = security_bprm_alloc(&bprm); + if (retval) goto out; retval = prepare_binprm(&bprm); -- cgit v1.2.3