diff options
author | Roland McGrath <roland@gnu.org> | 1999-05-20 01:27:20 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1999-05-20 01:27:20 +0000 |
commit | 7eeae80a56f155e4bad6ca89b47fd9b9b259e183 (patch) | |
tree | 30ca04bb571766d86cdbbed5250de9c857617907 /trans | |
parent | a85fa9fc7d2ab30c6f28db0b760dc3d9ce7c95f4 (diff) |
1999-05-19 Roland McGrath <roland@baalperazim.frob.com>
* null.c (trivfs_S_io_read): Fix return value.
Reported by Steinar Hamre <steinarh@fim.ntnu.no>.
Diffstat (limited to 'trans')
-rw-r--r-- | trans/null.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/trans/null.c b/trans/null.c index 44e19cc3..79de5174 100644 --- a/trans/null.c +++ b/trans/null.c @@ -1,6 +1,6 @@ /* A translator for providing endless empty space and immediate eof. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -118,16 +118,15 @@ trivfs_S_io_read(struct trivfs_protid *cred, off_t offs, mach_msg_type_number_t amt) { - error_t err = 0; - if (!cred) - err = EOPNOTSUPP; + return EOPNOTSUPP; else if (!(cred->po->openmodes & O_READ)) - err = EBADF; + return EBADF; else - *datalen = 0; - - return 0; + { + *datalen = 0; + return 0; + } } /* Tell how much data can be read from the object without blocking for |