Mercurial > hg > octave-nkf > gnulib-hg
changeset 7396:6f79ccad009d
2006-10-02 Dmitry V. Levin <ldv@altlinux.org>
* fts.c (fts_close, fts_build, fts_palloc): Remove redundant checks.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Wed, 04 Oct 2006 08:24:26 +0000 |
parents | be9c6fd49f01 |
children | 205d15e72fe9 |
files | lib/ChangeLog lib/fts.c |
diffstat | 2 files changed, 7 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2006-10-02 Dmitry V. Levin <ldv@altlinux.org> + + * fts.c (fts_close, fts_build, fts_palloc): Remove redundant checks. + 2006-10-02 Paolo Bonzini <bonzini@gnu.org> (tiny change) * quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
--- a/lib/fts.c +++ b/lib/fts.c @@ -459,8 +459,7 @@ /* Free up child linked list, sort array, file name buffer. */ if (sp->fts_child) fts_lfree(sp->fts_child); - if (sp->fts_array) - free(sp->fts_array); + free(sp->fts_array); free(sp->fts_path); if (ISSET(FTS_CWDFD)) @@ -957,8 +956,7 @@ * structures already allocated. */ mem1: saved_errno = errno; - if (p) - free(p); + free(p); fts_lfree(head); closedir(dirp); cur->fts_info = FTS_ERR; @@ -1335,10 +1333,7 @@ * See if fts_pathlen would overflow. */ if (new_len < sp->fts_pathlen) { - if (sp->fts_path) { - free(sp->fts_path); - sp->fts_path = NULL; - } + free(sp->fts_path); sp->fts_path = NULL; __set_errno (ENAMETOOLONG); return false;