This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[patch] use mkstemp instead of mktemp.
- From: Muthukumar Ratty <muthu at iqmail dot net>
- To: <binutils at sources dot redhat dot com>
- Date: Tue, 1 Jul 2003 19:02:50 -0700 (PDT)
- Subject: [patch] use mkstemp instead of mktemp.
Hi All,
I was compiling the binutils from cvs and got the following warning ...
/backup/bleed/BINUTILS/src/binutils/bucomm.c:441: the use of `mktemp' is
dangerous, better use `mkstemp'
Let me know if the following is ok...
thanks,
Muthu
--- binutils/bucomm.c Tue Jul 1 18:54:20 2003
+++ binutils-cvs/bucomm.c Tue Jul 1 18:53:53 2003
@@ -438,14 +438,14 @@ make_tempname (filename)
#endif
strcat (tmpname, "/");
strcat (tmpname, template);
- mkstemp (tmpname);
+ mktemp (tmpname);
*slash = c;
}
else
{
tmpname = xmalloc (sizeof (template));
strcpy (tmpname, template);
- mkstemp (tmpname);
+ mktemp (tmpname);
}
return tmpname;
}