summaryrefslogtreecommitdiffstats
path: root/sys/svr4/svr4_stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/svr4/svr4_stream.c')
-rw-r--r--sys/svr4/svr4_stream.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/svr4/svr4_stream.c b/sys/svr4/svr4_stream.c
index d495cc6..aa27ac0 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) {
OpenPOWER on IntegriCloud