[PATCH] radeon: Convert remaining x(c)alloc/xfree to m/calloc/free.

Alex Deucher alexdeucher at gmail.com
Mon Sep 27 10:35:37 PDT 2010


thanks applied.  Looks like your mailer mangled the patch however.

Alex

On Mon, Sep 27, 2010 at 12:34 PM, Nicolas Reinecke <nr at das-labor.org> wrote:
> Fixes deprecation warnings missed out by
> f7a91ece264af9f3fd2fc18e99aefcda93ce9f5c
> ---
> src/ati.c            |    2 +-
> src/theatre200.c     |    8 ++++----
> src/theatre_detect.c |    4 ++--
> 3 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/src/ati.c b/src/ati.c
> index 387aaca..ea71e88 100644
> --- a/src/ati.c
> +++ b/src/ati.c
> @@ -227,7 +227,7 @@ ati_gdev_subdriver(pointer options)
>         }
>     }
>
> -    xfree(ATIGDevs);
> +    free(ATIGDevs);
>
>     /* load subdrivers as primary modules and only if they do not get
> loaded
>      * from other device sections
> diff --git a/src/theatre200.c b/src/theatre200.c
> index 16b1840..1b2a46c 100644
> --- a/src/theatre200.c
> +++ b/src/theatre200.c
> @@ -162,7 +162,7 @@ static int microc_load (char* micro_path, char*
> micro_type, struct rt200_microc_
> {
> int ret;
>
> - curr_seg = (struct rt200_microc_seg*)Xalloc(sizeof(struct
> rt200_microc_seg));
> + curr_seg = (struct rt200_microc_seg*)malloc(sizeof(struct
> rt200_microc_seg));
> if (curr_seg == NULL)
> {
> ERROR_0("Cannot allocate memory\n");
> @@ -178,7 +178,7 @@ static int microc_load (char* micro_path, char*
> micro_type, struct rt200_microc_
> goto fail_exit;
> }
>
> - curr_seg->data = (unsigned char*)Xalloc(curr_seg->num_bytes);
> + curr_seg->data = (unsigned char*)malloc(curr_seg->num_bytes);
> if (curr_seg->data == NULL)
> {
> ERROR_0("cannot allocate memory\n");
> @@ -241,7 +241,7 @@ static int microc_load (char* micro_path, char*
> micro_type, struct rt200_microc_
>
> for (i = 0; i < microc_headp->num_seg; i++)
> {
> - curr_seg = (struct rt200_microc_seg*)Xalloc(sizeof(struct
> rt200_microc_seg));
> + curr_seg = (struct rt200_microc_seg*)malloc(sizeof(struct
> rt200_microc_seg));
> if (curr_seg == NULL)
> {
> ERROR_0("Cannot allocate memory\n");
> @@ -262,7 +262,7 @@ static int microc_load (char* micro_path, char*
> micro_type, struct rt200_microc_
> goto fail_exit;
> }
>
> - curr_seg->data = (unsigned char*)Xalloc(curr_seg->num_bytes);
> + curr_seg->data = (unsigned char*)malloc(curr_seg->num_bytes);
> if (curr_seg->data == NULL)
> {
> ERROR_0("cannot allocate memory\n");
> diff --git a/src/theatre_detect.c b/src/theatre_detect.c
> index 7e7f813..44cd9fa 100644
> --- a/src/theatre_detect.c
> +++ b/src/theatre_detect.c
> @@ -79,7 +79,7 @@ _X_EXPORT TheatrePtr DetectTheatre(GENERIC_BUS_Ptr b)
>    return NULL;
>    }
>
> -   t = xcalloc(1,sizeof(TheatreRec));
> +   t = calloc(1,sizeof(TheatreRec));
>    t->VIP = b;
>    t->theatre_num = -1;
>    t->mode=MODE_UNINITIALIZED;
> @@ -113,7 +113,7 @@ _X_EXPORT TheatrePtr DetectTheatre(GENERIC_BUS_Ptr
> b)
>
>    if(t->theatre_num < 0)
>    {
> -   xfree(t);
> +   free(t);
>    return NULL;
>    }
>
> --
> 1.7.1
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati
>


More information about the xorg-driver-ati mailing list