svn commit: r318913 - head/lib/libc/gen
Pedro F. Giffuni
pfg at FreeBSD.org
Fri May 26 01:15:00 UTC 2017
Author: pfg
Date: Fri May 26 01:14:58 2017
New Revision: 318913
URL: https://svnweb.freebsd.org/changeset/base/318913
Log:
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)
Modified:
head/lib/libc/gen/fts-compat.c
head/lib/libc/gen/fts-compat11.c
head/lib/libc/gen/fts.c
Modified: head/lib/libc/gen/fts-compat.c
==============================================================================
--- head/lib/libc/gen/fts-compat.c Fri May 26 00:51:05 2017 (r318912)
+++ head/lib/libc/gen/fts-compat.c Fri May 26 01:14:58 2017 (r318913)
@@ -146,9 +146,6 @@ __fts_open_44bsd(char * const *argv, int
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
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. */
Modified: head/lib/libc/gen/fts-compat11.c
==============================================================================
--- head/lib/libc/gen/fts-compat11.c Fri May 26 00:51:05 2017 (r318912)
+++ head/lib/libc/gen/fts-compat11.c Fri May 26 01:14:58 2017 (r318913)
@@ -142,9 +142,6 @@ freebsd11_fts_open(char * const *argv, i
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, i
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);
Modified: head/lib/libc/gen/fts.c
==============================================================================
--- head/lib/libc/gen/fts.c Fri May 26 00:51:05 2017 (r318912)
+++ head/lib/libc/gen/fts.c Fri May 26 01:14:58 2017 (r318913)
@@ -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);
More information about the svn-src-head
mailing list