tools/dwarfDbg/dwarfDbgEsb.c
/*  Make more room. Leaving  contents unchanged, effectively.
  The NUL byte at end has room and this preserves that room.
*/
Make more room. Leaving  contents unchanged, effectively.
The NUL byte at end has room and this preserves that room.
Make more room . Leaving contents unchanged effectively . The NUL byte at end has room and this preserves that room .
static uint8_t esbAllocateMore(dwarfDbgPtr_t self, dwarfDbgEsb_t *data, size_t len) {
  size_t new_size = data->esbAllocatedSize + len;
  char* newd = 0;
  if (new_size < allocSize) {
    new_size = allocSize;
  }
  newd = realloc(data->esbString, new_size);
  if (!newd) {
    fprintf(stderr, "dwarfdump is out of memory re-allocating %lu bytes\n", (unsigned long) new_size);
    return TCL_ERROR;
  }
  data->esbString = newd;
  data->esbAllocatedSize = new_size;
  return TCL_OK;
}
static uint8_t esbAllocateMore ( dwarfDbgPtr_t self , dwarfDbgEsb_t * data , size_t len ) { size_t new_size = data -> esbAllocatedSize + len ; char * newd = 0 ; if ( new_size < allocSize ) { new_size = allocSize ; } newd = realloc ( data -> esbString , new_size ) ; if ( ! newd ) { fprintf ( stderr , " \n " , ( unsigned long ) new_size ) ; return TCL_ERROR ; } data -> esbString = newd ; data -> esbAllocatedSize = new_size ; return TCL_OK ; }
Make more room.
Make more room .
/*  If the area was reallocated by realloc() the earlier
    space was free()d by realloc(). */