Change a couple strstr() to strchr()
This commit is contained in:
parent
b9452bfc16
commit
e3693b72f0
|
@ -586,10 +586,10 @@ lang_compare_first_component (const char *a,
|
||||||
unsigned int da, db;
|
unsigned int da, db;
|
||||||
const char *p;
|
const char *p;
|
||||||
|
|
||||||
p = strstr (a, "-");
|
p = strchr (a, '-');
|
||||||
da = p ? (unsigned int) (p - a) : strlen (a);
|
da = p ? (unsigned int) (p - a) : strlen (a);
|
||||||
|
|
||||||
p = strstr (b, "-");
|
p = strchr (b, '-');
|
||||||
db = p ? (unsigned int) (p - b) : strlen (b);
|
db = p ? (unsigned int) (p - b) : strlen (b);
|
||||||
|
|
||||||
return strncmp (a, b, MAX (da, db));
|
return strncmp (a, b, MAX (da, db));
|
||||||
|
|
Loading…
Reference in New Issue