summaryrefslogtreecommitdiffstats
path: root/source/history.c
diff options
context:
space:
mode:
authorQball Cow <qball@gmpclient.nl>2014-05-19 16:48:50 +0200
committerQball Cow <qball@gmpclient.nl>2014-05-19 16:48:50 +0200
commitcb15a57fb701b3a882d1c7d5974f198e2a302d24 (patch)
tree07e36092acdddcbd200fce83b23350b7f72f6f02 /source/history.c
parentb535533569fb5a5c1f44aa9d8746202d40bae0a9 (diff)
Remove memory wrappers, and use system stuff directly.
Diffstat (limited to 'source/history.c')
-rw-r--r--source/history.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/history.c b/source/history.c
index 1fbd5c12..759ab3ed 100644
--- a/source/history.c
+++ b/source/history.c
@@ -90,8 +90,8 @@ static _element ** __history_get_element_list ( FILE *fd, unsigned int *length )
{
continue;
}
- retv = reallocate ( retv, ( *length + 2 ) * sizeof ( _element* ) );
- retv[(*length)] = allocate ( sizeof ( _element ) );
+ retv = realloc ( retv, ( *length + 2 ) * sizeof ( _element* ) );
+ retv[(*length)] = malloc ( sizeof ( _element ) );
// remove trailing \n
buffer[strlen ( buffer ) - 1] = '\0';
// Parse the number of times.
@@ -139,8 +139,8 @@ void history_set ( const char *filename, const char *entry )
}else{
// If not exists, add it.
// Increase list by one
- list = reallocate(list,(length+2)*sizeof(_element *));
- list[length] = allocate(sizeof(_element));
+ list = realloc(list,(length+2)*sizeof(_element *));
+ list[length] = malloc(sizeof(_element));
// Copy name
strncpy(list[length]->name, entry, HISTORY_NAME_LENGTH);
list[length]->name[HISTORY_NAME_LENGTH-1] = '\0';
@@ -247,7 +247,7 @@ char ** history_get_list ( const char *filename, unsigned int *length )
// Copy list in right format.
if((*length) > 0 )
{
- retv = allocate(((*length)+1)*sizeof(char *));
+ retv = malloc(((*length)+1)*sizeof(char *));
for ( int iter = 0; iter < (*length); iter++)
{
retv[iter] = strdup(list[iter]->name);