Changeset 632e278 in rtems-libbsd


Ignore:
Timestamp:
Oct 21, 2016, 9:05:29 AM (3 years ago)
Author:
Christian Mauderer <Christian.Mauderer@…>
Branches:
afaeccc05a556f6aa25ba044a7e49d6aa634a59e, freebsd-9.3, master
Children:
ade8f56
Parents:
0ba4197
git-author:
Christian Mauderer <Christian.Mauderer@…> (10/21/16 09:05:29)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/24/16 06:13:04)
Message:

rtemsbsd: Add reallocf to rtems_bsd_program.

Location:
rtemsbsd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/include/machine/rtems-bsd-program.h

    r0ba4197 r632e278  
    103103rtems_bsd_program_realloc(void *ptr, size_t size);
    104104
     105void *
     106rtems_bsd_program_reallocf(void *ptr, size_t size);
     107
    105108char *
    106109rtems_bsd_program_strdup(const char *s1);
     
    165168#endif
    166169
     170#ifndef RTEMS_BSD_PROGRAM_NO_REALLOC_WRAP
     171  #define reallocf(ptr, size) rtems_bsd_program_reallocf(ptr, size)
     172#endif
     173
    167174#ifndef RTEMS_BSD_PROGRAM_NO_STRDUP_WRAP
    168175  #define strdup(s1) rtems_bsd_program_strdup(s1)
  • rtemsbsd/rtems/rtems-program.c

    r0ba4197 r632e278  
    536536}
    537537
     538void *
     539rtems_bsd_program_reallocf(void *ptr, size_t size)
     540{
     541        void *ret = rtems_bsd_program_alloc(size, ptr);
     542        if (ret == NULL) {
     543                free(ptr);
     544        }
     545        return ret;
     546}
     547
    538548char *
    539549rtems_bsd_program_strdup(const char *s1)
Note: See TracChangeset for help on using the changeset viewer.