Ignore:
Timestamp:
Jul 8, 2015, 4:13:47 PM (9 years ago)
Author:
alain
Message:

1) Fix a bug in the _free() function in kernel_malloc.c
2) Introduce a strlen() function in utils.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_common/utils.c

    r523 r594  
    596596}
    597597
     598////////////////////////////////////
     599unsigned int _strlen( char* string )
     600{
     601    unsigned int i = 0;
     602    while ( string[i] != 0 ) i++;
     603    return i;
     604}
     605
    598606///////////////////////////////////////
    599607unsigned int _strncmp( const char * s1,
     
    616624
    617625    while (*source)
    618         *(dest++) = *(source++);
    619 
     626    {
     627        *(dest) = *(source);
     628        dest++;
     629        source++;
     630    }
     631    *dest = 0;
    620632    return dest;
    621633}
     
    717729
    718730/////////////////////////////////
    719 void * memset( void*        dst,
    720                int          value,
    721                unsigned int count )
     731void* memset( void*        dst,
     732              int          value,
     733              unsigned int count )
    722734{
    723735    // word-by-word copy
Note: See TracChangeset for help on using the changeset viewer.