Changeset b4288f0 in rtems


Ignore:
Timestamp:
Oct 15, 2008, 5:50:00 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
7589cbf
Parents:
1fae7b43
Message:

2008-10-15 Joel Sherrill <joel.sherrill@…>

PR 1303/bsps

  • fatal/bspfatal.c: strcat() is safe to use even in worst case, so do not have BSP specific mystrcat().
Location:
c/src/lib/libbsp/m68k/mvme167
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/mvme167/ChangeLog

    r1fae7b43 rb4288f0  
     12008-10-15      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        PR 1303/bsps
     4        * fatal/bspfatal.c: strcat() is safe to use even in worst case, so do
     5        not have BSP specific mystrcat().
     6
    172008-09-30      Ralf Corsépius <ralf.corsepius@rtems.org>
    28
  • c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c

    r1fae7b43 rb4288f0  
    1414#include <bsp.h>
    1515#include <fatal.h>
    16 
    17 /*
    18  *  mystrcat
    19  *
    20  *  Can't rely on libc being operational. So we provide our own strcat-like
    21  *  function.
    22  *
    23  *  Input parameters:
    24  *    destination - string (buffer) to append to
    25  *    source - string to append to the end of destination
    26  *
    27  *  Output parameters:
    28  *    destination - source is appended to the end
    29  *
    30  *  Return values:
    31  *    Number of characters appended.
    32  */
    33 static int mystrcat(
    34   char *destination,
    35   const char *source
    36 )
    37 {
    38   int i;
    39 
    40   for ( i = 0; ( *destination++ = *source++) != '\0'; i++ );
    41   return i;
    42 }
     16#include <string.h>
    4317
    4418/*
     
    7448
    7549  my_p_str.index = 0;
    76   my_p_str.index += mystrcat(
     50  my_p_str.index += strcat(
    7751      my_p_str.strbuf + my_p_str.index,
    7852      "\r\nRTEMS Fatal Error Occurred:\r\n    the_source  = " );
     
    8054  switch ( the_source ) {
    8155    case INTERNAL_ERROR_CORE:
    82       my_p_str.index += mystrcat(
     56      my_p_str.index += strcat(
    8357          my_p_str.strbuf + my_p_str.index,
    8458          "INTERNAL_ERROR_CORE\r\n    is_internal = " );
     
    8660
    8761    case INTERNAL_ERROR_RTEMS_API:
    88       my_p_str.index += mystrcat(
     62      my_p_str.index += strcat(
    8963          my_p_str.strbuf + my_p_str.index,
    9064          "INTERNAL_ERROR_RTEMS_API\r\n    is_internal = " );
     
    9266
    9367    case INTERNAL_ERROR_POSIX_API:
    94       my_p_str.index += mystrcat(
     68      my_p_str.index += strcat(
    9569          my_p_str.strbuf + my_p_str.index,
    9670          "INTERNAL_ERROR_POSIX_API\r\n    is_internal = " );
     
    9872
    9973    default:
    100       my_p_str.index += mystrcat(
     74      my_p_str.index += strcat(
    10175          my_p_str.strbuf + my_p_str.index,
    10276          "UNKNOWN\r\n    is_internal = " );
     
    10579
    10680  if ( is_internal )
    107     my_p_str.index += mystrcat(
     81    my_p_str.index += strcat(
    10882        my_p_str.strbuf + my_p_str.index,
    10983        "TRUE\r\n    the_error   = 0x|10,8|\r\n" );
    11084  else
    111     my_p_str.index += mystrcat(
     85    my_p_str.index += strcat(
    11286        my_p_str.strbuf + my_p_str.index,
    11387        "FALSE\r\n    the_error   = 0x|10,8|\r\n" );
Note: See TracChangeset for help on using the changeset viewer.