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

Alan Coopersmith alan.coopersmith at oracle.com
Sun Jan 16 12:57:14 PST 2011


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



More information about the xorg-devel mailing list