aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-05-27 06:04:07 +0000
committerUlrich Drepper <drepper@redhat.com>2008-05-27 06:04:07 +0000
commit62605cbfcb3d2f118c9f64ce049220b82928e6d4 (patch)
tree0af0f74a35664879e6a6e455122e3eec1ba24d0d /libio
parent4b2c85c0b9a04b0ca4e4d031a5b92b2160f17bc3 (diff)
downloadglibc-62605cbfcb3d2f118c9f64ce049220b82928e6d4.zip
glibc-62605cbfcb3d2f118c9f64ce049220b82928e6d4.tar.gz
glibc-62605cbfcb3d2f118c9f64ce049220b82928e6d4.tar.bz2
Remove useless more "if" tests before "free".
* include/inline-hashtab.h (htab_delete): Likewise. * libio/freopen.c (freopen): Likewise. * libio/freopen64.c (freopen64): Likewise. * locale/programs/ld-collate.c (collate_read): Likewise. * misc/fstab.c (libc_freeres_fn): Likewise. * posix/glob.c (globfree): Likewise.
Diffstat (limited to 'libio')
-rw-r--r--libio/freopen.c5
-rw-r--r--libio/freopen64.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/libio/freopen.c b/libio/freopen.c
index d94a562..d80815f 100644
--- a/libio/freopen.c
+++ b/libio/freopen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,95,96,97,98,2000,2001,2002,2003
+/* Copyright (C) 1993,95,96,97,98,2000,2001,2002,2003,2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -80,8 +80,7 @@ freopen (filename, mode, fp)
if (fd != -1)
{
__close (fd);
- if (filename != NULL)
- free ((char *) filename);
+ free ((char *) filename);
}
_IO_release_lock (fp);
return result;
diff --git a/libio/freopen64.c b/libio/freopen64.c
index f8da78c..2dad6d7 100644
--- a/libio/freopen64.c
+++ b/libio/freopen64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,1995,1996,1997,1998,2000,2001,2002, 2003
+/* Copyright (C) 1993,1995,1996,1997,1998,2000,2001,2002, 2003, 2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -64,8 +64,7 @@ freopen64 (filename, mode, fp)
if (fd != -1)
{
__close (fd);
- if (filename != NULL)
- free ((char *) filename);
+ free ((char *) filename);
}
_IO_release_lock (fp);
return result;