]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Patch taken from glibc.
authorBruno Haible <bruno@clisp.org>
Sat, 31 May 2008 01:10:31 +0000 (01:10 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:44 +0000 (12:15 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/bindtextdom.c
gettext-runtime/intl/loadmsgcat.c

index c2c0260b96fb090d84de64d194402f2e7002a801..00f3c66d677b450295603eef91cf1a34c4772bdb 100644 (file)
@@ -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
index dab5d4f3577752b34b7327b21657177f7bf7fb50..54ce061e24ec59f02212865b76fd85c6981d9363 100644 (file)
@@ -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;
index 3432a8c1c9351da2d78be3916366bae7cd5c35b1..bf883a37efafd7a26977c40bd688670b1faef289 100644 (file)
@@ -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)