summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/include/rtems/libio_.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libcsupport/include/rtems/libio_.h')
-rw-r--r--cpukit/libcsupport/include/rtems/libio_.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h
index d021c1b7ca..1300d39b41 100644
--- a/cpukit/libcsupport/include/rtems/libio_.h
+++ b/cpukit/libcsupport/include/rtems/libio_.h
@@ -107,7 +107,7 @@ extern rtems_filesystem_global_location_t rtems_filesystem_global_location_null;
*/
#define rtems_libio_iop_to_descriptor(_iop) \
- ((!(_iop)) ? -1 : (_iop - rtems_libio_iops))
+ ((_iop) - &rtems_libio_iops[0])
/*
* rtems_libio_check_is_open