提交 e3693b72 编写于 作者: B Behdad Esfahbod

Change a couple strstr() to strchr()

上级 b9452bfc
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册