summaryrefslogtreecommitdiffstats
path: root/sys/compat/svr4/svr4_stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/svr4/svr4_stream.c')
-rw-r--r--sys/compat/svr4/svr4_stream.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c
index 2d8ea84..c0f7134 100644
--- a/sys/compat/svr4/svr4_stream.c
+++ b/sys/compat/svr4/svr4_stream.c
@@ -1717,8 +1717,7 @@ svr4_sys_putmsg(td, uap)
struct file *fp;
int error;
- fp = ffind_hold(td, uap->fd);
- if (fp == NULL) {
+ if ((error = fget(td, uap->fd, &fp)) != 0) {
#ifdef DEBUG_SVR4
uprintf("putmsg: bad fp\n");
#endif
@@ -1905,8 +1904,7 @@ svr4_sys_getmsg(td, uap)
struct file *fp;
int error;
- fp = ffind_hold(td, uap->fd);
- if (fp == NULL) {
+ if ((error = fget(td, uap->fd, &fp)) != 0) {
#ifdef DEBUG_SVR4
uprintf("getmsg: bad fp\n");
#endif
OpenPOWER on IntegriCloud