summaryrefslogtreecommitdiff
path: root/src/chown-core.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-31 18:26:16 +0200
committerJim Meyering <meyering@redhat.com>2009-09-01 12:10:07 +0200
commitb2c30136dce9d9cb14afc1431f83b8e4bf75ee0a (patch)
treeb613464e726cddc189c9ff181ede8209210c0c11 /src/chown-core.c
parente3b14643f49573b23f707e124374e0065119a3e6 (diff)
downloadcoreutils-b2c30136dce9d9cb14afc1431f83b8e4bf75ee0a.tar.xz
maint: chown, chgrp, chmod, chcon: remove unnecessary initialization
* src/chown-core.c: Include "ignore-value.h". (change_file_owner): Don't set "ent" only to ignore it. * src/chcon.c (process_file): Likewise. * src/chmod.c: Include "ignore-value.h". (process_file): Don't set "ent" only to ignore it. After diagnosing root-dev/ino failure, return false immediately: Now that we don't set "ent" we must be sure not to use it uninitialized, and there's no point in issuing --verbose-related output in this case.
Diffstat (limited to 'src/chown-core.c')
-rw-r--r--src/chown-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/chown-core.c b/src/chown-core.c
index 7e5774ee1..eb349049e 100644
--- a/src/chown-core.c
+++ b/src/chown-core.c
@@ -25,6 +25,7 @@
#include "system.h"
#include "chown-core.h"
#include "error.h"
+#include "ignore-value.h"
#include "quote.h"
#include "root-dev-ino.h"
#include "xfts.h"
@@ -270,7 +271,7 @@ change_file_owner (FTS *fts, FTSENT *ent,
/* Tell fts not to traverse into this hierarchy. */
fts_set (fts, ent, FTS_SKIP);
/* Ensure that we do not process "/" on the second visit. */
- ent = fts_read (fts);
+ ignore_ptr (fts_read (fts));
return false;
}
return true;