]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(ftw_startup): Don't shadow outer declaration of save_err.
authorJim Meyering <jim@meyering.net>
Sat, 8 Feb 2003 18:19:57 +0000 (18:19 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 8 Feb 2003 18:19:57 +0000 (18:19 +0000)
Merge inconsequential changes from libc.

lib/ftw.c

index b3dd2fc706d901b9f6f6ccf7d04fbb943a3b9224..5ae747df224fbc0a736e94c2095dd0592b1e8297 100644 (file)
--- a/lib/ftw.c
+++ b/lib/ftw.c
@@ -38,9 +38,9 @@ char *alloca ();
 
 #if defined _LIBC
 # include <dirent.h>
-# define NAMLEN(dirent) _D_EXACT_NAMLEN(dirent)
+# define NAMLEN(dirent) _D_EXACT_NAMLEN (dirent)
 #else
-# if HAVE_DIRENT_H || defined _LIBC
+# if HAVE_DIRENT_H
 #  include <dirent.h>
 #  define NAMLEN(dirent) strlen ((dirent)->d_name)
 # else
@@ -93,20 +93,23 @@ char *stpcpy ();
 # define __closedir closedir
 # undef __fchdir
 # define __fchdir fchdir
+# undef __getcwd
+# define __getcwd(P, N) xgetcwd ()
+extern char *xgetcwd (void);
+# undef __mempcpy
+# define __mempcpy mempcpy
 # undef __opendir
 # define __opendir opendir
 # undef __readdir64
 # define __readdir64 readdir
+# undef __stpcpy
+# define __stpcpy stpcpy
 # undef __tdestroy
 # define __tdestroy tdestroy
 # undef __tfind
 # define __tfind tfind
 # undef __tsearch
 # define __tsearch tsearch
-# undef __stpcpy
-# define __stpcpy stpcpy
-# undef __mempcpy
-# define __mempcpy mempcpy
 # undef internal_function
 # define internal_function /* empty */
 # undef dirent64
@@ -115,12 +118,6 @@ char *stpcpy ();
 # define MAX(a, b) ((a) > (b) ? (a) : (b))
 #endif
 
-#ifndef _LIBC
-# undef __getcwd
-# define __getcwd(P, N) xgetcwd ()
-extern char *xgetcwd (void);
-#endif
-
 /* Arrange to make lstat calls go through the wrapper function
    on systems with an lstat function that does not dereference symlinks
    that are specified with a trailing slash.  */
@@ -430,7 +427,7 @@ process_entry (struct ftw_data *data, struct dir_data *dir, const char *name,
 
              if (result == 0 && (data->flags & FTW_CHDIR))
                {
-                 /* Change back to parent directory.  */
+                 /* Change back to the parent directory.  */
                  int done = 0;
                  if (dir->stream != NULL)
                    if (__fchdir (dirfd (dir->stream)) == 0)
@@ -773,7 +770,7 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
   /* Return to the start directory (if necessary).  */
   if (cwd != NULL)
     {
-      int save_err = errno;
+      save_err = errno;
       __chdir (cwd);
       free (cwd);
       __set_errno (save_err);