diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-06-16 23:04:41 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-06-16 23:04:41 +0000 |
commit | 323fb88dac799cddfaa33cb80f7fc3395c2297e5 (patch) | |
tree | f853cfdf9b5bcde5a90324bb2115b225bb405ebd /locale/setlocale.c | |
parent | Update. (diff) | |
download | glibc-323fb88dac799cddfaa33cb80f7fc3395c2297e5.tar.gz glibc-323fb88dac799cddfaa33cb80f7fc3395c2297e5.tar.bz2 glibc-323fb88dac799cddfaa33cb80f7fc3395c2297e5.zip |
Update.
2000-06-16 Ulrich Drepper <drepper@redhat.com>
* iconv/gconv_int.h (norm_add_slashes): Optionally add given suffix.
* iconv/gconv_open.c: Remove error handling specification from `from'
character set name.
* intl/loadmsgcat.c (_nl_load_domain): Call norm_add_slashes with
new parameter to always enable transliteration.
* locale/localeinfo.h (LIMAGIC): Bump number because of incompatible
change.
(struct locale_data): Add new members use_translit and options.
* locale/findlocale.c (_nl_find_locale): Set use_translit flag is
character set name contained modifier TRANSLIT.
* locale/loadlocale.c (_nl_load_locale): Initialize new use_translit
and options fields.
(_nl_unload_locale): Free options string if necessary.
* wcsmbs/wcsmbsload.c (__wcsmbs_load_conv): Enable translation if
the locale names suggested this.
* locale/C-address.c: Add two new initialilzers to adjust data
structure for new format.
* locale/C-collate.c: Likewise.
* locale/C-ctype.c: Likewise.
* locale/C-identification.c: Likewise.
* locale/C-measurement.c: Likewise.
* locale/C-messages.c: Likewise.
* locale/C-monetary.c: Likewise.
* locale/C-name.c: Likewise.
* locale/C-numeric.c: Likewise.
* locale/C-paper.c: Likewise.
* locale/C-telephone.c: Likewise.
* locale/C-time.c: Likewise.
* locale/setlocale.c: Add some more __builtin_expect.
Diffstat (limited to 'locale/setlocale.c')
-rw-r--r-- | locale/setlocale.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/locale/setlocale.c b/locale/setlocale.c index 0bf9eeef7b..03456fba71 100644 --- a/locale/setlocale.c +++ b/locale/setlocale.c @@ -220,7 +220,8 @@ setlocale (int category, const char *locale) char *composite; /* Sanity check for CATEGORY argument. */ - if (category < 0 || category >= __LC_LAST) + if (__builtin_expect (category, 0) < 0 + || __builtin_expect (category, 0) >= __LC_LAST) ERROR_RETURN; /* Does user want name of current locale? */ @@ -261,7 +262,7 @@ setlocale (int category, const char *locale) if (category != LC_ALL) newnames[category] = (char *) locale; - if (strchr (locale, ';') != NULL) + if (__builtin_expect (strchr (locale, ';') != NULL, 0)) { /* This is a composite name. Make a copy and split it up. */ char *np = strdupa (locale); |