summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/replace/replace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/replace/replace.c b/lib/replace/replace.c
index c076ba1fc8..322bf49e91 100644
--- a/lib/replace/replace.c
+++ b/lib/replace/replace.c
@@ -412,8 +412,8 @@ int rep_mkstemp(char *template)
{
/* have a reasonable go at emulating it. Hope that
the system mktemp() isn't completely hopeless */
- char *p = mktemp(template);
- if (!p)
+ mktemp(template);
+ if (template[0] == 0)
return -1;
return open(p, O_CREAT|O_EXCL|O_RDWR, 0600);
}