mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 18:35:27 +08:00
2009-05-15 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/getitimer.c, posix/src/setitimer.c: Add error checks and clean up so coverage analysis is possible.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2009-05-15 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* posix/src/getitimer.c, posix/src/setitimer.c: Add error checks and
|
||||
clean up so coverage analysis is possible.
|
||||
|
||||
2009-05-15 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* posix/src/sysconf.c: Restructure to improve coverage analysis.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-20089
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -23,12 +23,17 @@ int getitimer(
|
||||
struct itimerval *value
|
||||
)
|
||||
{
|
||||
if ( !value )
|
||||
rtems_set_errno_and_return_minus_one( EFAULT );
|
||||
|
||||
switch ( which ) {
|
||||
case ITIMER_REAL: break;
|
||||
case ITIMER_VIRTUAL: break;
|
||||
case ITIMER_PROF: break;
|
||||
case ITIMER_REAL:
|
||||
case ITIMER_VIRTUAL:
|
||||
case ITIMER_PROF:
|
||||
rtems_set_errno_and_return_minus_one( ENOSYS );
|
||||
default:
|
||||
break;
|
||||
}
|
||||
rtems_set_errno_and_return_minus_one( ENOSYS );
|
||||
/* return -1; */
|
||||
rtems_set_errno_and_return_minus_one( EINVAL );
|
||||
}
|
||||
|
||||
|
||||
@@ -24,12 +24,20 @@ int setitimer(
|
||||
struct itimerval *ovalue
|
||||
)
|
||||
{
|
||||
if ( !value )
|
||||
rtems_set_errno_and_return_minus_one( EFAULT );
|
||||
|
||||
if ( !ovalue )
|
||||
rtems_set_errno_and_return_minus_one( EFAULT );
|
||||
|
||||
switch ( which ) {
|
||||
case ITIMER_REAL: break;
|
||||
case ITIMER_VIRTUAL: break;
|
||||
case ITIMER_PROF: break;
|
||||
case ITIMER_REAL:
|
||||
case ITIMER_VIRTUAL:
|
||||
case ITIMER_PROF:
|
||||
rtems_set_errno_and_return_minus_one( ENOSYS );
|
||||
default:
|
||||
break;
|
||||
}
|
||||
rtems_set_errno_and_return_minus_one( ENOSYS );
|
||||
/* return -1; */
|
||||
rtems_set_errno_and_return_minus_one( EINVAL );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user