Changeset 812f440 in rtems


Ignore:
Timestamp:
10/21/99 16:38:49 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
9583f6e
Parents:
39537657
Message:

Fixed core dump caused when output parameter (otimer) was NULL.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/src/ptimer.c

    r39537657 r812f440  
    590590   int               timer_pos;  /* Position of the timer in the table  */
    591591   rtems_time_of_day rtems_time; /* Time in RTEMS                       */
     592   
    592593
    593594   /* First the position in the table of timers is obtained */
     
    624625      /* The old data of the timer are returned */
    625626
    626       COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
     627      if ( ovalue )
     628        COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
    627629
    628630      /* The new data are set */
     
    683685               * returns the old ones in "ovalue" */
    684686
    685               COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
     687              if ( ovalue )
     688                COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
    686689
    687690              COPY_ITIMERSPEC_S ( value, &timer_struct[timer_pos].timer_data );
     
    758761               * returns the old ones in "ovalue" */
    759762
    760               COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
     763              if ( ovalue )
     764                COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
    761765
    762766              COPY_ITIMERSPEC_S ( value, &timer_struct[timer_pos].timer_data );
  • cpukit/posix/src/ptimer.c

    r39537657 r812f440  
    590590   int               timer_pos;  /* Position of the timer in the table  */
    591591   rtems_time_of_day rtems_time; /* Time in RTEMS                       */
     592   
    592593
    593594   /* First the position in the table of timers is obtained */
     
    624625      /* The old data of the timer are returned */
    625626
    626       COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
     627      if ( ovalue )
     628        COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
    627629
    628630      /* The new data are set */
     
    683685               * returns the old ones in "ovalue" */
    684686
    685               COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
     687              if ( ovalue )
     688                COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
    686689
    687690              COPY_ITIMERSPEC_S ( value, &timer_struct[timer_pos].timer_data );
     
    758761               * returns the old ones in "ovalue" */
    759762
    760               COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
     763              if ( ovalue )
     764                COPY_ITIMERSPEC_S ( &timer_struct[timer_pos].timer_data, ovalue );
    761765
    762766              COPY_ITIMERSPEC_S ( value, &timer_struct[timer_pos].timer_data );
Note: See TracChangeset for help on using the changeset viewer.