diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-11 10:14:19 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-11 10:14:19 +0400 |
commit | d923b542aa2d115bb87e72e156be837cea752536 (patch) | |
tree | e2a0c475d8d1aee4c790e77765554b6926871ab6 /src/ftfont.c | |
parent | 57054ddd444bd1702f2bcc08321d3ed3a644448e (diff) | |
download | emacs-d923b542aa2d115bb87e72e156be837cea752536.tar.gz |
Avoid call to strlen in fast_c_string_match_ignore_case.
* search.c (fast_c_string_match_ignore_case): Change to use
length argument. Adjust users accordingly.
* lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
Diffstat (limited to 'src/ftfont.c')
-rw-r--r-- | src/ftfont.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ftfont.c b/src/ftfont.c index 8e322369868..131a27f76e0 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -598,7 +598,9 @@ ftfont_get_charset (Lisp_Object registry) re[j] = '\0'; regexp = make_unibyte_string (re, j); for (i = 0; fc_charset_table[i].name; i++) - if (fast_c_string_match_ignore_case (regexp, fc_charset_table[i].name) >= 0) + if (fast_c_string_match_ignore_case + (regexp, fc_charset_table[i].name, + strlen (fc_charset_table[i].name)) >= 0) break; if (! fc_charset_table[i].name) return -1; |