diff options
author | Ulrich Drepper <drepper@redhat.com> | 2008-05-27 06:04:07 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2008-05-27 06:04:07 +0000 |
commit | 62605cbfcb3d2f118c9f64ce049220b82928e6d4 (patch) | |
tree | 0af0f74a35664879e6a6e455122e3eec1ba24d0d /posix/glob.c | |
parent | 4b2c85c0b9a04b0ca4e4d031a5b92b2160f17bc3 (diff) | |
download | glibc-62605cbfcb3d2f118c9f64ce049220b82928e6d4.tar.gz |
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 'posix/glob.c')
-rw-r--r-- | posix/glob.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/posix/glob.c b/posix/glob.c index b7d9617267..73081ece66 100644 --- a/posix/glob.c +++ b/posix/glob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006, 2007 +/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -1075,8 +1075,7 @@ globfree (pglob) { size_t i; for (i = 0; i < pglob->gl_pathc; ++i) - if (pglob->gl_pathv[pglob->gl_offs + i] != NULL) - free (pglob->gl_pathv[pglob->gl_offs + i]); + free (pglob->gl_pathv[pglob->gl_offs + i]); free (pglob->gl_pathv); pglob->gl_pathv = NULL; } |