![]() ![]() | ![]() |
version 1.30, 2019/06/27 18:03:37 | version 1.31, 2019/06/28 05:35:35 | ||
---|---|---|---|
|
|
||
mktempmode(char *tmp, int mode) | mktempmode(char *tmp, int mode) | ||
{ | { | ||
int fd = mkstemp(tmp); | int fd = mkstemp(tmp); | ||
if (fd < 0) | if (fd == -1) | ||
return (NULL); | return (NULL); | ||
fchmod(fd, mode & (S_IRWXU|S_IRWXG|S_IRWXO)); | fchmod(fd, mode & (S_IRWXU|S_IRWXG|S_IRWXO)); | ||
return (fdopen(fd, "wb")); | return (fdopen(fd, "wb")); |