Changeset f5dc557 in rtems


Ignore:
Timestamp:
Jun 22, 2010, 3:36:06 PM (9 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.11, master
Children:
db904606
Parents:
da361aa
Message:

2010-06-22 Jennifer Averett <Jennifer.Averett@…>

  • posix/src/nanosleep.c, posix/src/timersettime.c: Removed redundent code and cleaned up error checking code.
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rda361aa rf5dc557  
     12010-06-22      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     2
     3        * posix/src/nanosleep.c, posix/src/timersettime.c: Removed redundent
     4        code and cleaned up error checking code.
     5
    162010-06-22      Sebastian Huber <sebastian.huber@embedded-brains.de>
    27
  • cpukit/posix/src/nanosleep.c

    rda361aa rf5dc557  
    3737  Watchdog_Interval  ticks;
    3838
    39   if ( !_Timespec_Is_valid( rqtp ) )
    40     rtems_set_errno_and_return_minus_one( EINVAL );
    4139
    4240  /*
     
    4644   *         FSU and GNU/Linux pthreads shares this behavior.
    4745   */
    48   if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 )
     46  if ( !_Timespec_Is_valid( rqtp ) )
    4947    rtems_set_errno_and_return_minus_one( EINVAL );
    5048
  • cpukit/posix/src/timersettime.c

    rda361aa rf5dc557  
    4343    rtems_set_errno_and_return_minus_one( EINVAL );
    4444
    45   /* First, it verifies if the structure "value" is correct */
    46   if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) ||
    47        ( value->it_value.tv_nsec < 0 ) ||
    48        ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) ||
    49        ( value->it_interval.tv_nsec < 0 )) {
    50     /* The number of nanoseconds is not correct */
     45  /*
     46   * First, it verifies if the structure "value" is correct   
     47   * if the number of nanoseconds is not correct return EINVAL
     48   */
     49  if ( !_Timespec_Is_valid( &(value->it_value) ) ) {
     50    rtems_set_errno_and_return_minus_one( EINVAL );
     51  }
     52  if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
    5153    rtems_set_errno_and_return_minus_one( EINVAL );
    5254  }
Note: See TracChangeset for help on using the changeset viewer.