aboutsummaryrefslogtreecommitdiff
path: root/intl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-03-19 06:43:34 +0000
committerUlrich Drepper <drepper@redhat.com>2008-03-19 06:43:34 +0000
commit72e6cdfa2cd95240439c72705ab28a2eebb7d04e (patch)
treeae830b7817948dc795cc92ec98216c478dde57e3 /intl
parent354b75277bc86768eafbbf5f590deb27e0a71d89 (diff)
downloadglibc-72e6cdfa2cd95240439c72705ab28a2eebb7d04e.zip
glibc-72e6cdfa2cd95240439c72705ab28a2eebb7d04e.tar.gz
glibc-72e6cdfa2cd95240439c72705ab28a2eebb7d04e.tar.bz2
Remove useless "if" before "free".
Diffstat (limited to 'intl')
-rw-r--r--intl/bindtextdom.c3
-rw-r--r--intl/loadmsgcat.c9
2 files changed, 4 insertions, 8 deletions
diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c
index fd527a1..7a956d4 100644
--- a/intl/bindtextdom.c
+++ b/intl/bindtextdom.c
@@ -203,8 +203,7 @@ set_binding_values (domainname, dirnamep, codesetp)
if (__builtin_expect (result != NULL, 1))
{
- if (binding->codeset != NULL)
- free (binding->codeset);
+ free (binding->codeset);
binding->codeset = result;
modified = 1;
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
index 537fd60..3cba7b1 100644
--- a/intl/loadmsgcat.c
+++ b/intl/loadmsgcat.c
@@ -1236,8 +1236,7 @@ _nl_load_domain (domain_file, domainbinding)
/* 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);
@@ -1289,12 +1288,10 @@ _nl_unload_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)