summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorPang Yan Han <pangyanhan@gmail.com>2011-08-22 13:00:33 +0800
committerDan McGee <dan@archlinux.org>2011-08-22 08:53:01 -0500
commite9b8a7693dce4d7be959c6a9f4112014884e647c (patch)
treee52c52828aa747e0866e288f79966f52196b2ea6 /src/util
parentd9e5dab6aceeb4d32cfa52d5500f0d22cabb487b (diff)
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>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/pacsort.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/pacsort.c b/src/util/pacsort.c
index 109d1a16..082ba728 100644
--- a/src/util/pacsort.c
+++ b/src/util/pacsort.c
@@ -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;
}