* lib/fts.c (fts_build): Go back to using _D_EXECT_NAMLEN
when that can be faster than strlen.
+2014-04-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ fts: avoid unnecessary strlen calls
+ * lib/fts.c (fts_build): Go back to using _D_EXECT_NAMLEN
+ when that can be faster than strlen.
+
2014-03-26 Bernhard Voelker <mail@bernhard-voelker.de>
fts: avoid unnecessary strlen calls
if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
continue;
- d_namelen = strlen (dp->d_name);
- if ((p = fts_alloc (sp, dp->d_name, d_namelen)) == NULL)
+ d_namelen = _D_EXACT_NAMLEN (dp);
+ p = fts_alloc (sp, dp->d_name, d_namelen);
+ if (!p)
goto mem1;
if (d_namelen >= maxlen) {
/* include space for NUL */