mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
chcon, chmod, chgrp, chown, du: do not ignore fts_close failure
This is probably never visible, but who knows... * src/chcon.c (process_files): Don't ignore fts_close failure. * src/chmod.c (process_files): Likewise. * src/chown-core.c (chown_files): Likewise. * src/du.c (du_files): Likewise.
This commit is contained in:
1 parent
1ce27f74ec
commit
228c8e9eec
4 files changed
+8
-16
No files matched your search
+2
-4
@@ -324,10 +324,8 @@ process_files (char **files, int bit_flags)
|
||||
ok &= process_file (fts, ent);
|
||||
}
|
||||
|
||||
/* Ignore failure, since the only way it can do so is in failing to
|
||||
return to the original directory, and since we're about to exit,
|
||||
that doesn't matter. */
|
||||
fts_close (fts);
|
||||
if (fts_close (fts) != 0)
|
||||
ok = false;
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
+2
-4
@@ -335,10 +335,8 @@ process_files (char **files, int bit_flags)
|
||||
ok &= process_file (fts, ent);
|
||||
}
|
||||
|
||||
/* Ignore failure, since the only way it can do so is in failing to
|
||||
return to the original directory, and since we're about to exit,
|
||||
that doesn't matter. */
|
||||
fts_close (fts);
|
||||
if (fts_close (fts) != 0)
|
||||
ok = false;
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
+2
-4
@@ -509,10 +509,8 @@ chown_files (char **files, int bit_flags,
|
||||
required_uid, required_gid, chopt);
|
||||
}
|
||||
|
||||
/* Ignore failure, since the only way it can do so is in failing to
|
||||
return to the original directory, and since we're about to exit,
|
||||
that doesn't matter. */
|
||||
fts_close (fts);
|
||||
if (fts_close (fts) != 0)
|
||||
ok = false;
|
||||
|
||||
return ok;
|
||||
}
|
||||
@@ -642,10 +642,8 @@ du_files (char **files, int bit_flags)
|
||||
ok &= process_file (fts, ent);
|
||||
}
|
||||
|
||||
/* Ignore failure, since the only way it can do so is in failing to
|
||||
return to the original directory, and since we're about to exit,
|
||||
that doesn't matter. */
|
||||
fts_close (fts);
|
||||
if (fts_close (fts) != 0)
|
||||
ok = false;
|
||||
}
|
||||
|
||||
return ok;
|
||||
|
||||
Reference in new issue
Block a user