[PATCH:xf86-input-mouse 1/4] sun_mouse.c: Remove redundant option checks

Alexandr Shadchin alexandr.shadchin at gmail.com
Sun Apr 29 07:00:56 PDT 2012


On Fri, Apr 27, 2012 at 05:43:49PM -0700, Alan Coopersmith wrote:
> Previously they checked pInfo->options, then fell back to
> pInfo->conf_idev->commonOptions - but then 7bf22a368c752fe76dc
> replaced the latter with the former, resulting in some redunancy.
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>  src/sun_mouse.c |    6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/src/sun_mouse.c b/src/sun_mouse.c
> index ad38ba4..9a594cd 100644
> --- a/src/sun_mouse.c
> +++ b/src/sun_mouse.c
> @@ -611,16 +611,10 @@ solarisMouseAutoProbe(InputInfoPtr pInfo, const char **protocol,
>      if (*device == NULL) {
>  	/* Check to see if xorg.conf or HAL specified a device to use */
>  	*device = xf86CheckStrOption(pInfo->options, "Device", NULL);
> -	if (*device == NULL) {
> -	    *device = xf86CheckStrOption(pInfo->options, "Device", NULL);
> -	}
>      }
>  
>      if (*device != NULL) {
>  	strmod = xf86CheckStrOption(pInfo->options, "StreamsModule", NULL);
> -	if (strmod == NULL) {
> -	    strmod = xf86CheckStrOption(pInfo->options, "StreamsModule", NULL);
> -	}
>  	if (strmod) {
>  	    /* if a device name is already known, and a StreamsModule is
>  	       specified to convert events to VUID, then we don't need to
> -- 
> 1.7.9.2
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reviewed-by: Alexandr Shadchin <alexandr.shadchin at gmail.com>

-- 
Alexandr Shadchin



More information about the xorg-devel mailing list