summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/__times.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-28 22:14:35 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-28 22:14:35 +0000
commit45fcb767c3d32d764053c8694825e3ac2da02e1c (patch)
tree238e6a6472ec35f18aaf54e5bae0a88af0da9e5d /cpukit/libcsupport/src/__times.c
parent2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-45fcb767c3d32d764053c8694825e3ac2da02e1c.tar.bz2
2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/__brk.c, libcsupport/src/__gettod.c, libcsupport/src/__times.c, libcsupport/src/fchdir.c, libcsupport/src/ftrylockfile.c, libcsupport/src/getpwent.c, libcsupport/src/gxx_wrappers.c, libcsupport/src/libio_sockets.c, libcsupport/src/pipe.c: Use rtems_set_errno_and_return_minus_one() where it was missed before.
Diffstat (limited to '')
-rw-r--r--cpukit/libcsupport/src/__times.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/cpukit/libcsupport/src/__times.c b/cpukit/libcsupport/src/__times.c
index c14aa99395..f44142bede 100644
--- a/cpukit/libcsupport/src/__times.c
+++ b/cpukit/libcsupport/src/__times.c
@@ -22,6 +22,7 @@
#include <sys/time.h>
#include <errno.h>
#include <assert.h>
+#include <rtems/seterr.h>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
#include <rtems/score/timestamp.h>
#endif
@@ -32,10 +33,8 @@ clock_t _times(
{
rtems_interval ticks;
- if ( !ptms ) {
- errno = EFAULT;
- return -1;
- }
+ if ( !ptms )
+ rtems_set_errno_and_return_minus_one( EFAULT );
/*
* This call does not depend on TOD being initialized and can't fail.