pacsort: correct pointer type in list_new

Pointer sizes are the same but this makes intention clearer.

Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Pang Yan Han 2011-08-22 13:00:33 +08:00 committed by Dan McGee
parent d9e5dab6ac
commit e9b8a7693d
1 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ static struct list_t *list_new(size_t initial_size)
return NULL;
}
list->list = calloc(initial_size, sizeof(char **));
list->list = calloc(initial_size, sizeof(char *));
if(!list->list) {
free(list);
return NULL;
@ -117,7 +117,7 @@ static struct list_t *list_new(size_t initial_size)
static int list_grow(struct list_t *list)
{
size_t newsz = list->maxcount * 2.5;
list->list = realloc(list->list, newsz * sizeof(char*));
list->list = realloc(list->list, newsz * sizeof(char *));
if(!list->list) {
return 1;
}