[PATCH 1/2] synclient.c: Replace old index() function with C89-standard strchr()

Peter Hutterer peter.hutterer at who-t.net
Sun Jan 16 13:26:26 PST 2011


On Sun, Jan 16, 2011 at 12:57:14PM -0800, Alan Coopersmith wrote:
> Fixes Solaris compiler warnings of:
> "synclient.c", line 152: warning: implicit function declaration: index
> "synclient.c", line 152: warning: improper pointer/integer combination: op "="
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>  tools/synclient.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/tools/synclient.c b/tools/synclient.c
> index e7be499..9776d23 100644
> --- a/tools/synclient.c
> +++ b/tools/synclient.c
> @@ -149,7 +149,7 @@ static struct Parameter params[] = {
>  static double
>  parse_cmd(char* cmd, struct Parameter** par)
>  {
> -    char *eqp = index(cmd, '=');
> +    char *eqp = strchr(cmd, '=');
>      *par = NULL;
>  
>      if (eqp) {
> -- 
> 1.7.3.2

both patches applied, thanks.

Cheers,
  Peter


More information about the xorg-devel mailing list