[PATCH xf86-input-vmmouse 1/2] Deprecated code cleanup.

Peter Hutterer peter.hutterer at who-t.net
Mon Oct 18 16:14:56 PDT 2010


On Mon, Oct 18, 2010 at 12:11:24PM -0400, Trevor Woerner wrote:
> From: Trevor Woerner <twoerner at gmail.com>
> 
> Signed-off-by: Trevor Woerner <twoerner at gmail.com>

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

> ---
>  src/vmmouse.c |   18 +++++++++---------
>  1 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/src/vmmouse.c b/src/vmmouse.c
> index f5ad234..1154762 100644
> --- a/src/vmmouse.c
> +++ b/src/vmmouse.c
> @@ -249,7 +249,7 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
>  }
>  #endif
>  
> -   mPriv = xcalloc (1, sizeof (VMMousePrivRec));
> +   mPriv = calloc (1, sizeof (VMMousePrivRec));
>  
>  
>     if (!mPriv) {
> @@ -270,7 +270,7 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
>        xf86Msg(X_ERROR, "VMWARE(0): vmmouse enable failed\n");
>        mPriv->vmmouseAvailable = FALSE;
>        passthruMouse = (InputDriverRec *)LoaderSymbol("MOUSE");
> -      xfree(mPriv);
> +      free(mPriv);
>        if(passthruMouse != NULL){
>  	 return (passthruMouse->PreInit)(drv, dev, flags);
>        } else {
> @@ -291,7 +291,7 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
>     }
>  
>     if (!(pInfo = xf86AllocateInput(drv, 0))) {
> -      xfree(mPriv);
> +      free(mPriv);
>        return NULL;
>     }
>  
> @@ -316,8 +316,8 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
>     pInfo->conf_idev = dev;
>  
>     /* Allocate the MouseDevRec and initialise it. */
> -   if (!(pMse = xcalloc(sizeof(MouseDevRec), 1))) {
> -      xfree(mPriv);
> +   if (!(pMse = calloc(sizeof(MouseDevRec), 1))) {
> +      free(mPriv);
>        return pInfo;
>     }
>  
> @@ -340,8 +340,8 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
>        else {
>  	 xf86Msg(X_ERROR, "%s: cannot open input device\n", pInfo->name);
>  	 if (pMse->mousePriv)
> -	    xfree(pMse->mousePriv);
> -	 xfree(pMse);
> +	    free(pMse->mousePriv);
> +	 free(pMse);
>  	 pInfo->private = NULL;
>  	 return pInfo;
>        }
> @@ -645,7 +645,7 @@ MouseCommonOptions(InputInfoPtr pInfo)
>        }
>        if (msg) {
>  	 xf86Msg(X_CONFIG, "%s: ZAxisMapping: %s\n", pInfo->name, msg);
> -	 xfree(msg);
> +	 free(msg);
>        } else {
>  	 xf86Msg(X_WARNING, "%s: Invalid ZAxisMapping value: \"%s\"\n",
>  		 pInfo->name, s);
> @@ -1201,7 +1201,7 @@ VMMousePlug(pointer	module,
>     if (!LoadSubModule(module, name, NULL, NULL, NULL, NULL, errmaj, errmin)) {
>        LoaderErrorMsg(NULL, name, *errmaj, *errmin);
>     }
> -   xfree(name);
> +   free(name);
>  }
>  #endif
>  
> -- 
> 1.7.3.1.104.gc752e


More information about the xorg-devel mailing list