This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.20-102-g6ab1d1e


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  6ab1d1ea969df0698ee413a247948fc035e12276 (commit)
      from  e436eb790f577218f9cea15e545500e952df80ae (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ab1d1ea969df0698ee413a247948fc035e12276

commit 6ab1d1ea969df0698ee413a247948fc035e12276
Author: Roland McGrath <roland@hack.frob.com>
Date:   Mon Oct 20 15:32:26 2014 -0700

    Tiny refactoring in fts to eliminate a warning.

diff --git a/ChangeLog b/ChangeLog
index f6a0371..962e730 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-10-20  Roland McGrath  <roland@hack.frob.com>
 
+	* io/fts.c (dirent_not_directory): New function.
+	(fts_build): Call it.
+
+2014-10-20  Roland McGrath  <roland@hack.frob.com>
+
 	* nptl/version.c (__nptl_main): Use normal __write rather than
 	INTERNAL_SYSCALL.
 	(banner): Update copyright years.
diff --git a/io/fts.c b/io/fts.c
index c9c054d..46cbb72 100644
--- a/io/fts.c
+++ b/io/fts.c
@@ -561,6 +561,16 @@ fts_children(sp, instr)
 	return (sp->fts_child);
 }
 
+static inline int
+dirent_not_directory(const struct dirent *dp)
+{
+#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE
+        return dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN;
+#else
+        return 0;
+#endif
+}
+
 /*
  * This is the tricky part -- do not casually change *anything* in here.  The
  * idea is to build the linked list of entries that are used by fts_children
@@ -759,11 +769,7 @@ mem1:				saved_errno = errno;
 				p->fts_info = FTS_NSOK;
 			p->fts_accpath = cur->fts_accpath;
 		} else if (nlinks == 0
-#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE
-			   || (nostat &&
-			       dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
-#endif
-		    ) {
+                           || (nostat && dirent_not_directory(dp))) {
 			p->fts_accpath =
 			    ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name;
 			p->fts_info = FTS_NSOK;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog |    5 +++++
 io/fts.c  |   16 +++++++++++-----
 2 files changed, 16 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]