[patch] use mkstemp instead of mktemp.

Muthukumar Ratty muthu@iqmail.net
Wed Jul 2 02:10:00 GMT 2003


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;
 }




More information about the Binutils mailing list