From a128674505078487ccd21b1af49734ea7feb769a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 2 Oct 2006 16:08:05 +0000 Subject: * 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. --- ChangeLog | 9 +++++++++ io/fts.c | 11 +++-------- manual/message.texi | 4 ++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index d78dffcfa0..9ddd2f5805 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-10-02 Dmitry V. Levin + + * 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 * posix/glob.c (glob_in_dir): Add some comments and asserts to 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); diff --git a/manual/message.texi b/manual/message.texi index eab98e9338..1507a6d04a 100644 --- a/manual/message.texi +++ b/manual/message.texi @@ -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. -- cgit v1.2.3