Change a couple strstr() to strchr()

This commit is contained in:
Behdad Esfahbod 2011-06-15 09:33:52 -04:00
parent b9452bfc16
commit e3693b72f0
1 changed files with 2 additions and 2 deletions

View File

@ -586,10 +586,10 @@ lang_compare_first_component (const char *a,
unsigned int da, db;
const char *p;
p = strstr (a, "-");
p = strchr (a, '-');
da = p ? (unsigned int) (p - a) : strlen (a);
p = strstr (b, "-");
p = strchr (b, '-');
db = p ? (unsigned int) (p - b) : strlen (b);
return strncmp (a, b, MAX (da, db));