diff options
| author | Dmitry Antipov | 2012-07-11 10:14:19 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-07-11 10:14:19 +0400 |
| commit | d923b542aa2d115bb87e72e156be837cea752536 (patch) | |
| tree | e2a0c475d8d1aee4c790e77765554b6926871ab6 /src/ftfont.c | |
| parent | 57054ddd444bd1702f2bcc08321d3ed3a644448e (diff) | |
| download | emacs-d923b542aa2d115bb87e72e156be837cea752536.tar.gz emacs-d923b542aa2d115bb87e72e156be837cea752536.zip | |
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) | |||
| 598 | re[j] = '\0'; | 598 | re[j] = '\0'; |
| 599 | regexp = make_unibyte_string (re, j); | 599 | regexp = make_unibyte_string (re, j); |
| 600 | for (i = 0; fc_charset_table[i].name; i++) | 600 | for (i = 0; fc_charset_table[i].name; i++) |
| 601 | if (fast_c_string_match_ignore_case (regexp, fc_charset_table[i].name) >= 0) | 601 | if (fast_c_string_match_ignore_case |
| 602 | (regexp, fc_charset_table[i].name, | ||
| 603 | strlen (fc_charset_table[i].name)) >= 0) | ||
| 602 | break; | 604 | break; |
| 603 | if (! fc_charset_table[i].name) | 605 | if (! fc_charset_table[i].name) |
| 604 | return -1; | 606 | return -1; |