Use strchr instead of index

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2012-03-03 01:15:56 +02:00
parent 4bc839ab89
commit 1616b8642c
1 changed files with 3 additions and 3 deletions

View File

@ -761,7 +761,7 @@ XkbRF_SubstituteVars(char *name, XkbRF_MultiDefsPtr mdefs)
int len, ndx;
orig= name;
str= index(name,'%');
str= strchr(name,'%');
if (str==NULL)
return name;
len= strlen(name);
@ -779,7 +779,7 @@ XkbRF_SubstituteVars(char *name, XkbRF_MultiDefsPtr mdefs)
var = str + 1;
str = get_index(var + 1, &ndx);
if (ndx == -1) {
str = index(str,'%');
str = strchr(str,'%');
continue;
}
if ((*var=='l') && mdefs->layout[ndx] && *mdefs->layout[ndx])
@ -791,7 +791,7 @@ XkbRF_SubstituteVars(char *name, XkbRF_MultiDefsPtr mdefs)
if ((pfx=='(')&&(*str==')')) {
str++;
}
str= index(&str[0],'%');
str= strchr(&str[0],'%');
}
name= (char *)malloc(len+1);
str= orig;