diff options
| author | Mark Newton <newton@FreeBSD.org> | 1999-12-12 10:28:30 +0000 |
|---|---|---|
| committer | Mark Newton <newton@FreeBSD.org> | 1999-12-12 10:28:30 +0000 |
| commit | 84fbe5a0ba07369cebb82226bb353ab1e0a0c62c (patch) | |
| tree | 0945fa30ab2c524dd4b39dc240e5ce262f250342 | |
| parent | ce12799bad863bc7d71cf4f26d359c120ee5d7fa (diff) | |
Notes
| -rw-r--r-- | sys/compat/svr4/svr4_stream.c | 16 | ||||
| -rw-r--r-- | sys/svr4/svr4_stream.c | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c index d495cc63359f..aa27ac04eef2 100644 --- a/sys/compat/svr4/svr4_stream.c +++ b/sys/compat/svr4/svr4_stream.c @@ -1703,8 +1703,9 @@ svr4_sys_putmsg(p, uap) caddr_t sg; retval = p->p_retval; - if ((u_int)SCARG(uap, fd) >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL) { + fp = fdp->fd_ofiles[SCARG(uap, fd)]; + + if (((u_int)SCARG(uap, fd) >= fdp->fd_nfiles) || (fp == NULL)) { #ifdef DEBUG_SVR4 uprintf("putmsg: bad fp\n"); #endif @@ -1716,8 +1717,7 @@ svr4_sys_putmsg(p, uap) SCARG(uap, dat), SCARG(uap, flags)); #endif /* DEBUG_SVR4 */ - if ((u_int)SCARG(uap, fd) >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL) { + if (((u_int)SCARG(uap, fd) >= fdp->fd_nfiles) || (fp == NULL)) { #ifdef DEBUG_SVR4 uprintf("putmsg: bad fp(2)\n"); #endif @@ -1891,8 +1891,9 @@ svr4_sys_getmsg(p, uap) caddr_t sg; retval = p->p_retval; - if ((u_int)SCARG(uap, fd) >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL) + fp = fdp->fd_ofiles[SCARG(uap, fd)]; + + if (((u_int)SCARG(uap, fd) >= fdp->fd_nfiles) || (fp == NULL)) return EBADF; memset(&sc, 0, sizeof(sc)); @@ -1902,8 +1903,7 @@ svr4_sys_getmsg(p, uap) SCARG(uap, dat), 0); #endif /* DEBUG_SVR4 */ - if ((u_int)SCARG(uap, fd) >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL) + if (((u_int)SCARG(uap, fd) >= fdp->fd_nfiles) || (fp == NULL)) return EBADF; if (SCARG(uap, ctl) != NULL) { diff --git a/sys/svr4/svr4_stream.c b/sys/svr4/svr4_stream.c index d495cc63359f..aa27ac04eef2 100644 --- a/sys/svr4/svr4_stream.c +++ b/sys/svr4/svr4_stream.c @@ -1703,8 +1703,9 @@ svr4_sys_putmsg(p, uap) caddr_t sg; retval = p->p_retval; - if ((u_int)SCARG(uap, fd) >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL) { + fp = fdp->fd_ofiles[SCARG(uap, fd)]; + + if (((u_int)SCARG(uap, fd) >= fdp->fd_nfiles) || (fp == NULL)) { #ifdef DEBUG_SVR4 uprintf("putmsg: bad fp\n"); #endif @@ -1716,8 +1717,7 @@ svr4_sys_putmsg(p, uap) SCARG(uap, dat), SCARG(uap, flags)); #endif /* DEBUG_SVR4 */ - if ((u_int)SCARG(uap, fd) >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL) { + if (((u_int)SCARG(uap, fd) >= fdp->fd_nfiles) || (fp == NULL)) { #ifdef DEBUG_SVR4 uprintf("putmsg: bad fp(2)\n"); #endif @@ -1891,8 +1891,9 @@ svr4_sys_getmsg(p, uap) caddr_t sg; retval = p->p_retval; - if ((u_int)SCARG(uap, fd) >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL) + fp = fdp->fd_ofiles[SCARG(uap, fd)]; + + if (((u_int)SCARG(uap, fd) >= fdp->fd_nfiles) || (fp == NULL)) return EBADF; memset(&sc, 0, sizeof(sc)); @@ -1902,8 +1903,7 @@ svr4_sys_getmsg(p, uap) SCARG(uap, dat), 0); #endif /* DEBUG_SVR4 */ - if ((u_int)SCARG(uap, fd) >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL) + if (((u_int)SCARG(uap, fd) >= fdp->fd_nfiles) || (fp == NULL)) return EBADF; if (SCARG(uap, ctl) != NULL) { |
