summaryrefslogtreecommitdiffstats
path: root/include/fileutils.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/fileutils.h')
-rw-r--r--include/fileutils.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/fileutils.h b/include/fileutils.h
index 2144e5e5d..98798f7ee 100644
--- a/include/fileutils.h
+++ b/include/fileutils.h
@@ -7,10 +7,11 @@ static inline FILE *xfmkstemp(char **tmpname, char *dir)
{
int fd;
FILE *ret;
+
fd = xmkstemp(tmpname, dir);
- if (fd == -1) {
+ if (fd == -1)
return NULL;
- }
+
if (!(ret = fdopen(fd, "w+" UL_CLOEXECSTR))) {
close(fd);
return NULL;