Add a bunch of checks to make gcc with glibc happy
This commit is contained in:
parent
80afa9e068
commit
38c64c4d4c
1 changed files with 8 additions and 2 deletions
|
@ -668,8 +668,14 @@ fetch(char *URL, const char *path)
|
|||
warn("%s: mkstemp failed", tmppath);
|
||||
goto failure;
|
||||
}
|
||||
fchown(fd, sb.st_uid, sb.st_gid);
|
||||
fchmod(fd, sb.st_mode & ALLPERMS);
|
||||
if (fchown(fd, sb.st_uid, sb.st_gid) == -1) {
|
||||
warn("%s: mkstemp failed", tmppath);
|
||||
goto failure;
|
||||
}
|
||||
if (fchmod(fd, sb.st_mode & ALLPERMS) == -1) {
|
||||
warn("%s: mkstemp failed", tmppath);
|
||||
goto failure;
|
||||
}
|
||||
of = fdopen(fd, "w");
|
||||
if (of == NULL) {
|
||||
close(fd);
|
||||
|
|
Loading…
Reference in a new issue