aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2021-10-27 23:23:11 +0300
committerLasse Collin <lasse.collin@tukaani.org>2022-07-12 19:01:09 +0300
commitca21733d24a4f65b46a5efa124a89c859ac5592e (patch)
tree6690fa9320fe9866b8c138c583c84acfa3698cd9
parentxz: Avoid fchown(2) failure. (diff)
downloadxz-ca21733d24a4f65b46a5efa124a89c859ac5592e.tar.xz
xz: Change the coding style of the previous commit.
It isn't any better now but it's consistent with the rest of the code base.
-rw-r--r--src/xz/file_io.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/xz/file_io.c b/src/xz/file_io.c
index 676508dc..3aadb225 100644
--- a/src/xz/file_io.c
+++ b/src/xz/file_io.c
@@ -369,12 +369,13 @@ io_copy_attrs(const file_pair *pair)
mode_t mode;
// With BSD semantics the new dest file may have a group that
- // does not belong to the user. If the src file has the same gid
- // nothing has to be done. Nevertheless OpenBSD fchown(2) fails
- // in this case which seems to be POSIX compliant. As there is
+ // does not belong to the user. If the src file has the same gid
+ // nothing has to be done. Nevertheless OpenBSD fchown(2) fails
+ // in this case which seems to be POSIX compliant. As there is
// nothing to do, skip the system call.
- if (pair->dest_st.st_gid != pair->src_st.st_gid &&
- fchown(pair->dest_fd, (uid_t)(-1), pair->src_st.st_gid)) {
+ if (pair->dest_st.st_gid != pair->src_st.st_gid
+ && fchown(pair->dest_fd, (uid_t)(-1),
+ pair->src_st.st_gid)) {
message_warning(_("%s: Cannot set the file group: %s"),
pair->dest_name, strerror(errno));
// We can still safely copy some additional permissions: