if (fchown (newfd, st.st_uid, st.st_gid) != 0) { ; }
/* Set the mode of the new file to the same values the
original file has. */
- if (fchmod (newfd, st.st_mode & ALLPERMS) != 0
- || close (newfd) != 0)
+ if (fchmod (newfd, st.st_mode & ALLPERMS) != 0)
goto nonew_unlink;
+ close (newfd);
newfd = -1;
if (rename (tmpfname, arfname) != 0)
goto nonew_unlink;
setting the mode (which might be reset/ignored if the owner is
wrong. */
if (fchown (newfd, st.st_uid, st.st_gid) != 0) { ; }
- if (fchmod (newfd, st.st_mode & ALLPERMS) != 0
- || close (newfd) != 0)
+ if (fchmod (newfd, st.st_mode & ALLPERMS) != 0)
goto nonew_unlink;
+ close (newfd);
newfd = -1;
if (rename (tmpfname, arfname) != 0)
goto nonew_unlink;
setting the modes, or they might be reset/ignored if the
owner is wrong. */
if (fchown (newfd, st.st_uid, st.st_gid) != 0) { ; }
- if (fchmod (newfd, st.st_mode & ALLPERMS) != 0
- || close (newfd) != 0)
+ if (fchmod (newfd, st.st_mode & ALLPERMS) != 0)
goto nonew_unlink;
+ close (newfd);
newfd = -1;
if (rename (tmpfname, arfname) != 0)
goto nonew_unlink;
if (fchown (newfd, st.st_uid, st.st_gid) != 0) { ; }
/* Set the mode of the new file to the same values the
original file has. */
- if (fchmod (newfd, st.st_mode & ALLPERMS) != 0
- || close (newfd) != 0)
+ if (fchmod (newfd, st.st_mode & ALLPERMS) != 0)
goto nonew_unlink;
+ close (newfd);
newfd = -1;
if (rename (tmpfname, fname) != 0)
goto nonew_unlink;