diff options
author | Bruno Haible <bruno@clisp.org> | 2008-05-31 01:10:31 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:15:44 +0200 |
commit | f0f7e541e4cc9d0209cea02fe0f745772bbef0ad (patch) | |
tree | b281e9f4ac2ae1a11058a5ab1e2319cbe71c0299 /gettext-runtime/intl | |
parent | 28090de36dcdca9a226c8dae1355be5683104e94 (diff) | |
download | external_gettext-f0f7e541e4cc9d0209cea02fe0f745772bbef0ad.zip external_gettext-f0f7e541e4cc9d0209cea02fe0f745772bbef0ad.tar.gz external_gettext-f0f7e541e4cc9d0209cea02fe0f745772bbef0ad.tar.bz2 |
Patch taken from glibc.
Diffstat (limited to 'gettext-runtime/intl')
-rw-r--r-- | gettext-runtime/intl/ChangeLog | 5 | ||||
-rw-r--r-- | gettext-runtime/intl/bindtextdom.c | 6 | ||||
-rw-r--r-- | gettext-runtime/intl/loadmsgcat.c | 11 |
3 files changed, 12 insertions, 10 deletions
diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index c2c0260..00f3c66 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,8 @@ +2008-02-10 Jim Meyering <meyering@redhat.com> + + * bindtextdom.c (set_binding_values): Remove useless "if" before "free". + * loadmsgcat.c (_nl_load_domain, _nl_unload_domain): Likewise. + 2008-05-27 Bruno Haible <bruno@clisp.org> * localename.c (SUBLANG_TIBETAN_BHUTAN): Force value 2. Needed for diff --git a/gettext-runtime/intl/bindtextdom.c b/gettext-runtime/intl/bindtextdom.c index dab5d4f..54ce061 100644 --- a/gettext-runtime/intl/bindtextdom.c +++ b/gettext-runtime/intl/bindtextdom.c @@ -1,5 +1,6 @@ /* Implementation of the bindtextdomain(3) function - Copyright (C) 1995-1998, 2000-2003, 2005-2006 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008 Free Software + Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -178,8 +179,7 @@ set_binding_values (const char *domainname, if (__builtin_expect (result != NULL, 1)) { - if (binding->codeset != NULL) - free (binding->codeset); + free (binding->codeset); binding->codeset = result; modified = 1; diff --git a/gettext-runtime/intl/loadmsgcat.c b/gettext-runtime/intl/loadmsgcat.c index 3432a8c..bf883a3 100644 --- a/gettext-runtime/intl/loadmsgcat.c +++ b/gettext-runtime/intl/loadmsgcat.c @@ -1,5 +1,5 @@ /* Load needed message catalogs. - Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000-2008 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -1259,8 +1259,7 @@ _nl_load_domain (struct loaded_l10nfile *domain_file, /* This is an invalid revision. */ invalid: /* This is an invalid .mo file. */ - if (domain->malloced) - free (domain->malloced); + free (domain->malloced); #ifdef HAVE_MMAP if (use_mmap) munmap ((caddr_t) data, size); @@ -1317,12 +1316,10 @@ _nl_unload_domain (struct loaded_domain *domain) if (convd->conv != (__gconv_t) -1) __gconv_close (convd->conv); } - if (domain->conversions != NULL) - free (domain->conversions); + free (domain->conversions); __libc_rwlock_fini (domain->conversions_lock); - if (domain->malloced) - free (domain->malloced); + free (domain->malloced); # ifdef _POSIX_MAPPED_FILES if (domain->use_mmap) |