[pacman-dev] [PATCH 1/2] pacsort: correct pointer type in list_new

Dan McGee dpmcgee at gmail.com
Mon Aug 22 09:41:34 EDT 2011


On Mon, Aug 22, 2011 at 12:00 AM, Pang Yan Han <pangyanhan at gmail.com> wrote:
> Signed-off-by: Pang Yan Han <pangyanhan at gmail.com>
> ---
> Pointer sizes are the same but this makes intention clearer.
This comment is on point enough to actually make it in the commit
message, so I did just that.

>  src/util/pacsort.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/util/pacsort.c b/src/util/pacsort.c
> index 109d1a1..48d183b 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;
> --
> 1.7.6
>
>
>


More information about the pacman-dev mailing list