* io/fts.c (fts_close): Remove redundant checks.
authorUlrich Drepper <drepper@redhat.com>
Mon, 2 Oct 2006 16:08:05 +0000 (16:08 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 2 Oct 2006 16:08:05 +0000 (16:08 +0000)
(fts_build): Likewise.
(fts_palloc): Likewise.

* manual/message.texi (Advanced gettext functions,
Using gettextized software): Fix typos.

ChangeLog
io/fts.c
manual/message.texi

index d78dffc..9ddd2f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
+
+       * 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.
+
 2006-09-30  Ulrich Drepper  <drepper@redhat.com>
 
        * posix/glob.c (glob_in_dir): Add some comments and asserts to
index 6383fe8..532743f 100644 (file)
--- 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);
index eab98e9..1507a6d 100644 (file)
@@ -1189,7 +1189,7 @@ the rules of how to select the plural form.  Since the formula varies
 with every language this is the only viable solution except for
 hardcoding the information in the code (which still would require the
 possibility of extensions to not prevent the use of new languages).  The
-details are explained in the GNU @code{gettext} manual.  Here only a a
+details are explained in the GNU @code{gettext} manual.  Here only a
 bit of information is provided.
 
 The information about the plural form selection has to be stored in the
@@ -1590,7 +1590,7 @@ the user to select the message s/he wants to see.  S/He must understand
 them.
 
 The POSIX locale model uses the environment variables @code{LC_COLLATE},
-@code{LC_CTYPE}, @code{LC_MESSAGES}, @code{LC_MONETARY}, @code{NUMERIC},
+@code{LC_CTYPE}, @code{LC_MESSAGES}, @code{LC_MONETARY}, @code{LC_NUMERIC},
 and @code{LC_TIME} to select the locale which is to be used.  This way
 the user can influence lots of functions.  As we mentioned above the
 @code{gettext} functions also take advantage of this.