summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/include/rtems/libio_.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-13 08:55:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-15 07:33:43 +0200
commit0169e90e8488b1af029486e7215600c87a014fa3 (patch)
tree0998a30e8a4c452cea2a20a45815d106229b3aeb /cpukit/libcsupport/include/rtems/libio_.h
parentlibio: Avoid direct use of rtems_libio_iops (diff)
downloadrtems-0169e90e8488b1af029486e7215600c87a014fa3.tar.bz2
libio: Do simple parameter checks early
This simplifies error handling later. Update #3132.
Diffstat (limited to '')
-rw-r--r--cpukit/libcsupport/include/rtems/libio_.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h
index 85f9c8e0a5..9bd8a8979c 100644
--- a/cpukit/libcsupport/include/rtems/libio_.h
+++ b/cpukit/libcsupport/include/rtems/libio_.h
@@ -871,13 +871,6 @@ static inline ssize_t rtems_libio_iovec_eval(
int v;
rtems_libio_t *iop;
- rtems_libio_check_fd( fd );
- iop = rtems_libio_iop( fd );
- rtems_libio_check_is_open( iop );
- rtems_libio_check_permissions_with_error( iop, flags, EBADF );
-
- *iopp = iop;
-
/*
* Argument validation on IO vector
*/
@@ -910,6 +903,13 @@ static inline ssize_t rtems_libio_iovec_eval(
}
}
+ rtems_libio_check_fd( fd );
+ iop = rtems_libio_iop( fd );
+ rtems_libio_check_is_open( iop );
+ rtems_libio_check_permissions_with_error( iop, flags, EBADF );
+
+ *iopp = iop;
+
return total;
}