about summary refs log tree commit diff
path: root/io/fts.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-10-02 16:08:05 +0000
committerUlrich Drepper <drepper@redhat.com>2006-10-02 16:08:05 +0000
commita128674505078487ccd21b1af49734ea7feb769a (patch)
tree099724d32a54aaaa2775fc18f5c45ae14c709435 /io/fts.c
parent40f86887cf1bd665006d31d6ae8554277bcb06c9 (diff)
downloadglibc-a128674505078487ccd21b1af49734ea7feb769a.tar.gz
glibc-a128674505078487ccd21b1af49734ea7feb769a.tar.xz
glibc-a128674505078487ccd21b1af49734ea7feb769a.zip
* io/fts.c (fts_close): Remove redundant checks.
	(fts_build): Likewise.
	(fts_palloc): Likewise.

	* manual/message.texi (Advanced gettext functions,
	Using gettextized software): Fix typos.
Diffstat (limited to 'io/fts.c')
-rw-r--r--io/fts.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/io/fts.c b/io/fts.c
index 6383fe8f17..532743fb3e 100644
--- a/io/fts.c
+++ b/io/fts.c
@@ -251,8 +251,7 @@ fts_close(sp)
 	/* Free up child linked list, sort array, path 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);
 
 	/* Return to original directory, save errno if necessary. */
@@ -705,8 +704,7 @@ fts_build(sp, type)
 				 * structures already allocated.
 				 */
 mem1:				saved_errno = errno;
-				if (p)
-					free(p);
+				free(p);
 				fts_lfree(head);
 				(void)__closedir(dirp);
 				cur->fts_info = FTS_ERR;
@@ -1043,10 +1041,7 @@ fts_palloc(sp, more)
 	 * We limit fts_pathlen to USHRT_MAX to be safe in both cases.
 	 */
 	if (sp->fts_pathlen < 0 || sp->fts_pathlen >= USHRT_MAX) {
-		if (sp->fts_path) {
-			free(sp->fts_path);
-			sp->fts_path = NULL;
-		}
+		free(sp->fts_path);
 		sp->fts_path = NULL;
 		__set_errno (ENAMETOOLONG);
 		return (1);