fts_open: move bogus initialization further below, before it is used.

Move an unneeded initialization, introduced in r54770 to quiet down GCC,
to a place nearer to its first use. This has no practical effect, it just
keeps the garbage better sorted.

Hinted by:	OpenBSD (CVS rev. 1.56, without obfuscations)
This commit is contained in:
Pedro F. Giffuni 2017-05-26 01:14:58 +00:00
parent 90d4415d20
commit 0523111725
3 changed files with 9 additions and 9 deletions

View File

@ -146,9 +146,6 @@ __fts_open_44bsd(char * const *argv, int options,
sp->fts_compar = compar;
sp->fts_options = options;
/* Shush, GCC. */
tmp = NULL;
/* Logical walks turn on NOCHDIR; symbolic links are too hard. */
if (ISSET(FTS_LOGICAL))
SET(FTS_NOCHDIR);
@ -165,6 +162,9 @@ __fts_open_44bsd(char * const *argv, int options,
goto mem2;
parent->fts_level = FTS_ROOTPARENTLEVEL;
/* Shush, GCC. */
tmp = NULL;
/* Allocate/initialize root(s). */
for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
/* Don't allow zero-length paths. */

View File

@ -142,9 +142,6 @@ freebsd11_fts_open(char * const *argv, int options,
sp->fts_compar = compar;
sp->fts_options = options;
/* Shush, GCC. */
tmp = NULL;
/* Logical walks turn on NOCHDIR; symbolic links are too hard. */
if (ISSET(FTS_LOGICAL))
SET(FTS_NOCHDIR);
@ -161,6 +158,9 @@ freebsd11_fts_open(char * const *argv, int options,
goto mem2;
parent->fts_level = FTS_ROOTPARENTLEVEL;
/* Shush, GCC. */
tmp = NULL;
/* Allocate/initialize root(s). */
for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
len = strlen(*argv);

View File

@ -137,9 +137,6 @@ fts_open(char * const *argv, int options,
sp->fts_compar = compar;
sp->fts_options = options;
/* Shush, GCC. */
tmp = NULL;
/* Logical walks turn on NOCHDIR; symbolic links are too hard. */
if (ISSET(FTS_LOGICAL))
SET(FTS_NOCHDIR);
@ -156,6 +153,9 @@ fts_open(char * const *argv, int options,
goto mem2;
parent->fts_level = FTS_ROOTPARENTLEVEL;
/* Shush, GCC. */
tmp = NULL;
/* Allocate/initialize root(s). */
for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
len = strlen(*argv);