[PATCH libXt] remove strcmp

Mark Kettenis mark.kettenis at xs4all.nl
Mon Nov 1 03:35:24 PDT 2010


> Date: Mon, 01 Nov 2010 09:44:43 +0100
> From: walter harms <wharms at bfs.de>
> 
> Mark Kettenis schrieb:
> >> Date: Tue, 26 Oct 2010 13:48:53 +0200
> >> From: walter harms <wharms at bfs.de>
> >>
> >> make remainder check like in the rest of code and replace strcmp()
> > 
> > Please try to keep the coding style similar to what's used for the
> > surrounding code.
> > 
> 
> give me a hint that is you problem ? the rest of the code uses "remainder[0]"

The spaces after the parenthesis in the if-statement.  You change:

    if (statement)

into

    if ( statement )

Cheers,

Mark

> >>  src/ResConfig.c |    2 +-
> >>  1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/src/ResConfig.c b/src/ResConfig.c
> >> index 7514754..eb2e7cc 100644
> >> --- a/src/ResConfig.c
> >> +++ b/src/ResConfig.c
> >> @@ -746,7 +746,7 @@ _search_widget_tree (
> >>  	/*
> >>  	 * this case covers resources of only one level (eg. *background)
> >>  	 */
> >> -	if (strcmp (remainder, "") == 0) {
> >> +	if ( remainder[0] == 0 ) {
> >>  		_set_resource_values (w, resource, value, last_part);
> >>  		if (last_token == '*')
> >>  			_apply_values_to_children (parent, remainder, resource,


More information about the xorg-devel mailing list