rename: compare_string_array -> index_in_str_array

introduce index_in_substr_array and use it in
iproute2
This commit is contained in:
Denis Vlasenko
2006-11-05 18:05:09 +00:00
parent 402151671b
commit 5af906e7c8
10 changed files with 50 additions and 44 deletions

View File

@@ -898,7 +898,7 @@ static int nfsmount(struct mntent *mp, int vfsflags, char *filteropts)
};
int val = xatoi_u(opteq + 1);
*opteq = '\0';
switch (compare_string_array(options, opt)) {
switch (index_in_str_array(options, opt)) {
case 0: // "rsize"
data.rsize = val;
break;
@@ -940,7 +940,7 @@ static int nfsmount(struct mntent *mp, int vfsflags, char *filteropts)
break;
case 12: // "mounthost"
mounthost = xstrndup(opteq+1,
strcspn(opteq+1," \t\n\r,"));
strcspn(opteq+1," \t\n\r,"));
break;
case 13: // "mountprog"
mountprog = val;
@@ -996,7 +996,7 @@ static int nfsmount(struct mntent *mp, int vfsflags, char *filteropts)
val = 0;
opt += 2;
}
switch (compare_string_array(options, opt)) {
switch (index_in_str_array(options, opt)) {
case 0: // "bg"
bg = val;
break;