Acked-by: Ping Cheng <[email protected]>

On Fri, May 21, 2010 at 5:12 AM, Peter Hutterer
<[email protected]> wrote:
> The X server is just deprecating them from the headers and the wrapping
> never had the desired effect anyway (which was to have alternative
> allocation implementations).
>
> This patch brought to you by sed.
>
> Signed-off-by: Peter Hutterer <[email protected]>
> ---
>  src/wcmCommon.c         |    4 ++--
>  src/wcmConfig.c         |   26 +++++++++++++-------------
>  src/wcmFilter.c         |    2 +-
>  src/wcmValidateDevice.c |   18 +++++++++---------
>  src/xf86Wacom.c         |    6 +++---
>  5 files changed, 28 insertions(+), 28 deletions(-)
>
> diff --git a/src/wcmCommon.c b/src/wcmCommon.c
> index 2cfab16..8f669b3 100644
> --- a/src/wcmCommon.c
> +++ b/src/wcmCommon.c
> @@ -376,13 +376,13 @@ void wcmEmitKeysym (DeviceIntPtr keydev, int keysym, 
> int state)
>                        xf86Msg (X_WARNING, "%s: Couldn't find key with code 
> %08x on keyboard device %s\n",
>                                        keydev->name, keysym, keydev->name);
>  #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
> -               xfree(ksr);
> +               free(ksr);
>  #endif
>                return;
>        }
>        xf86PostKeyboardEvent (keydev, i, state);
>  #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
> -       xfree(ksr);
> +       free(ksr);
>  #endif
>  }
>
> diff --git a/src/wcmConfig.c b/src/wcmConfig.c
> index 29d9f38..6262e4d 100644
> --- a/src/wcmConfig.c
> +++ b/src/wcmConfig.c
> @@ -40,19 +40,19 @@ static int wcmAllocate(LocalDevicePtr local)
>        WacomToolAreaPtr area   = NULL;
>        int i;
>
> -       priv = xcalloc(1, sizeof(WacomDeviceRec));
> +       priv = calloc(1, sizeof(WacomDeviceRec));
>        if (!priv)
>                goto error;
>
> -       common = xcalloc(1, sizeof(WacomCommonRec));
> +       common = calloc(1, sizeof(WacomCommonRec));
>        if (!common)
>                goto error;
>
> -       tool = xcalloc(1, sizeof(WacomTool));
> +       tool = calloc(1, sizeof(WacomTool));
>        if(!tool)
>                goto error;
>
> -       area = xcalloc(1, sizeof(WacomToolArea));
> +       area = calloc(1, sizeof(WacomToolArea));
>        if (!area)
>                goto error;
>
> @@ -147,10 +147,10 @@ static int wcmAllocate(LocalDevicePtr local)
>        return 1;
>
>  error:
> -       xfree(area);
> -       xfree(tool);
> -       xfree(common);
> -       xfree(priv);
> +       free(area);
> +       free(tool);
> +       free(common);
> +       free(priv);
>        return 0;
>  }
>
> @@ -284,9 +284,9 @@ static void wcmUninit(InputDriverPtr drv, LocalDevicePtr 
> local, int flags)
>        }
>
>        /* free pressure curve */
> -       xfree(priv->pPressCurve);
> +       free(priv->pPressCurve);
>
> -       xfree(priv);
> +       free(priv);
>        local->private = NULL;
>
>
> @@ -318,7 +318,7 @@ static Bool wcmMatchDevice(LocalDevicePtr pLocal)
>                {
>                        DBG(2, priv, "port share between"
>                                        " %s and %s\n", pLocal->name, 
> pMatch->name);
> -                       xfree(common);
> +                       free(common);
>                        common = priv->common = privMatch->common;
>                        priv->next = common->wcmDevices;
>                        common->wcmDevices = priv;
> @@ -435,8 +435,8 @@ SetupProc_fail:
>        /* restart the device list from the next one */
>        if (common && priv)
>                common->wcmDevices = priv->next;
> -       xfree(common);
> -       xfree(priv);
> +       free(common);
> +       free(priv);
>        if (local)
>        {
>                if (local->fd != -1)
> diff --git a/src/wcmFilter.c b/src/wcmFilter.c
> index 91b2f10..aa4aa4e 100644
> --- a/src/wcmFilter.c
> +++ b/src/wcmFilter.c
> @@ -65,7 +65,7 @@ void wcmSetPressureCurve(WacomDevicePtr pDev, int x0, int 
> y0,
>        /* if curve is not allocated, do it now. */
>        if (!pDev->pPressCurve)
>        {
> -               pDev->pPressCurve = (int*) xalloc(sizeof(int) *
> +               pDev->pPressCurve = (int*) malloc(sizeof(int) *
>                        (FILTER_PRESSURE_RES + 1));
>                if (!pDev->pPressCurve)
>                {
> diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
> index ccc2aac..438cf38 100644
> --- a/src/wcmValidateDevice.c
> +++ b/src/wcmValidateDevice.c
> @@ -262,16 +262,16 @@ static InputOption *wcmOptionDupConvert(LocalDevicePtr 
> local, const char *type)
>        memset(&dummy, 0, sizeof(dummy));
>        xf86CollectInputOptions(&dummy, NULL, original);
>
> -       name = xcalloc(strlen(local->name) + strlen(type) + 2, 1);
> +       name = calloc(strlen(local->name) + strlen(type) + 2, 1);
>        sprintf(name, "%s %s", local->name, type);
>
>        dummy.options = xf86ReplaceStrOption(dummy.options, "Type", type);
>        dummy.options = xf86ReplaceStrOption(dummy.options, "Name", name);
> -       xfree(name);
> +       free(name);
>
>        while(dummy.options)
>        {
> -               new = xcalloc(1, sizeof(InputOption));
> +               new = calloc(1, sizeof(InputOption));
>
>                new->key = xf86OptionName(dummy.options);
>                new->value = xf86OptionValue(dummy.options);
> @@ -288,9 +288,9 @@ static void wcmFreeInputOpts(InputOption* opts)
>        while(opts)
>        {
>                tmp = opts->next;
> -               xfree(opts->key);
> -               xfree(opts->value);
> -               xfree(opts);
> +               free(opts->key);
> +               free(opts->value);
> +               free(opts);
>                opts = tmp;
>        }
>  }
> @@ -538,7 +538,7 @@ int wcmParseOptions(LocalDevicePtr local, int hotplugged)
>                {
>                        WacomToolAreaPtr arealist;
>
> -                       xfree(tool);
> +                       free(tool);
>                        priv->tool = tool = toollist;
>                        arealist = toollist->arealist;
>
> @@ -674,8 +674,8 @@ int wcmParseOptions(LocalDevicePtr local, int hotplugged)
>
>        return 1;
>  error:
> -       xfree(area);
> -       xfree(tool);
> +       free(area);
> +       free(tool);
>        return 0;
>  }
>
> diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
> index fc01b0d..b5426c2 100644
> --- a/src/xf86Wacom.c
> +++ b/src/xf86Wacom.c
> @@ -216,7 +216,7 @@ static int wcmInitArea(LocalDevicePtr local)
>                        if (inlist->next == area)
>                        {
>                                inlist->next = area->next;
> -                               xfree(area);
> +                               free(area);
>                                priv->toolarea = NULL;
>                        break;
>                        }
> --
> 1.7.0.1
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Linuxwacom-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>

------------------------------------------------------------------------------

_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to