summaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_misc.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1999-05-06 18:44:42 +0000
committerPeter Wemm <peter@FreeBSD.org>1999-05-06 18:44:42 +0000
commitd5558c001a19cfd5853f6d7ec29ff06e59cc505e (patch)
treee66173b9fca9928c8edc1d91bff2929f2d2b1ae5 /sys/compat/linux/linux_misc.c
parent522c197d02fdb39228b2097a70e7f3d868a47a4c (diff)
Notes
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r--sys/compat/linux/linux_misc.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index e01693ad0aef..9976e641ed4b 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux_misc.c,v 1.56 1999/04/27 12:21:04 phk Exp $
+ * $Id: linux_misc.c,v 1.57 1999/04/28 01:04:19 luoqi Exp $
*/
#include <sys/param.h>
@@ -173,7 +173,8 @@ linux_uselib(struct proc *p, struct linux_uselib_args *args)
vp = NULL;
NDINIT(&ni, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, args->library, p);
- if (error = namei(&ni))
+ error = namei(&ni);
+ if (error)
goto cleanup;
vp = ni.ni_vp;
@@ -198,7 +199,8 @@ linux_uselib(struct proc *p, struct linux_uselib_args *args)
/*
* Executable?
*/
- if (error = VOP_GETATTR(vp, &attr, p->p_ucred, p))
+ error = VOP_GETATTR(vp, &attr, p->p_ucred, p);
+ if (error)
goto cleanup;
if ((vp->v_mount->mnt_flag & MNT_NOEXEC) ||
@@ -219,10 +221,12 @@ linux_uselib(struct proc *p, struct linux_uselib_args *args)
/*
* Can we access it?
*/
- if (error = VOP_ACCESS(vp, VEXEC, p->p_ucred, p))
+ error = VOP_ACCESS(vp, VEXEC, p->p_ucred, p);
+ if (error)
goto cleanup;
- if (error = VOP_OPEN(vp, FREAD, p->p_ucred, p))
+ error = VOP_OPEN(vp, FREAD, p->p_ucred, p);
+ if (error)
goto cleanup;
/*
@@ -772,12 +776,14 @@ linux_pipe(struct proc *p, struct linux_pipe_args *args)
printf("Linux-emul(%d): pipe(*)\n", p->p_pid);
#endif
reg_edx = p->p_retval[1];
- if (error = pipe(p, 0)) {
+ error = pipe(p, 0);
+ if (error) {
p->p_retval[1] = reg_edx;
return error;
}
- if (error = copyout(p->p_retval, args->pipefds, 2*sizeof(int))) {
+ error = copyout(p->p_retval, args->pipefds, 2*sizeof(int));
+ if (error) {
p->p_retval[1] = reg_edx;
return error;
}