summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-05-06 18:44:42 +0000
committerpeter <peter@FreeBSD.org>1999-05-06 18:44:42 +0000
commit459d4a2cc5e6111860f2c6a86117a230d98dd4e9 (patch)
tree3ebec15b9f996d9b97c11ef575d325c41cea11f1 /sys/compat/linux/linux_misc.c
parentdaa969b0667e983bbabc44c8ddcda321b70523c5 (diff)
downloadFreeBSD-src-459d4a2cc5e6111860f2c6a86117a230d98dd4e9.zip
FreeBSD-src-459d4a2cc5e6111860f2c6a86117a230d98dd4e9.tar.gz
Fix up a few easy 'assignment used as truth value' and 'suggest parens
around && within ||' type warnings. I'm pretty sure I have not masked any problems here, I've committed real problem fixes seperately.
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 e01693a..9976e64 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;
}
OpenPOWER on IntegriCloud