[PATCH libXp] fix build: Return 0 instead of NULL in XpGetPdmStartParams() (v2)

Jeremy Huddleston jeremyhu at apple.com
Fri Nov 25 09:28:06 PST 2011


Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>

On Nov 24, 2011, at 3:47 PM, Tobias Droste wrote:

> Status is defined as int -> NULL is not a valid return value
> 
> v2: Remove unneeded cast to Status
> 
> Signed-off-by: Tobias Droste <tdroste at gmx.de>
> ---
> src/XpNotifyPdm.c |    8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/XpNotifyPdm.c b/src/XpNotifyPdm.c
> index c1ceb8e..c77f9e1 100644
> --- a/src/XpNotifyPdm.c
> +++ b/src/XpNotifyPdm.c
> @@ -231,7 +231,7 @@ XpGetPdmStartParams (
> 	/*
> 	 * Error - cannot determine or establish a selection_display.
> 	 */
> -	return( (Status) NULL );
> +	return( 0 );
>     }
> 
>     /*
> @@ -268,7 +268,7 @@ XpGetPdmStartParams (
> 	    XCloseDisplay( *selection_display );
> 	    *selection_display = (Display *) NULL;
> 	}
> -	return( (Status) NULL );
> +	return( 0 );
>     }
> 
>     status = XmbTextListToTextProperty( *selection_display, list, 6,
> @@ -283,7 +283,7 @@ XpGetPdmStartParams (
> 	    XCloseDisplay( *selection_display );
> 	    *selection_display = (Display *) NULL;
> 	}
> -	return( (Status) NULL );
> +	return( 0 );
>     }
> 
>     *type              = text_prop.encoding;
> @@ -293,7 +293,7 @@ XpGetPdmStartParams (
> 
>     XFree(list[5]);
> 
> -    return( (Status) 1 );
> +    return( 1 );
> }
> 
> /******************************************************************************
> -- 
> 1.7.3.4
> 
> _______________________________________________
> 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
> 



More information about the xorg-devel mailing list