[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] Changes to ccvs/windows-NT/filesubr.c
From: |
Conrad T . Pino |
Subject: |
[Cvs-cvs] Changes to ccvs/windows-NT/filesubr.c |
Date: |
Tue, 20 Sep 2005 01:44:53 -0400 |
Index: ccvs/windows-NT/filesubr.c
diff -u ccvs/windows-NT/filesubr.c:1.59 ccvs/windows-NT/filesubr.c:1.60
--- ccvs/windows-NT/filesubr.c:1.59 Thu Aug 4 01:00:40 2005
+++ ccvs/windows-NT/filesubr.c Tue Sep 20 05:44:53 2005
@@ -692,8 +692,7 @@
/* FIXME: This should use the mkstemp() function from the lib/mkstemp.c file
* from the GNULIB project.
*/
-FILE *cvs_temp_file (filename)
- char **filename;
+FILE *cvs_temp_file (char ** filename)
{
char *fn;
FILE *fp;
@@ -705,9 +704,14 @@
/* assert (filename != NULL); */
- fn = _tempnam (Tmpdir, "cvs");
+ fn = _tempnam (getenv("TEMP"), "cvs");
if (fn == NULL) fp = NULL;
- else if ((fp = CVS_FOPEN (fn, "w+")) == NULL) free (fn);
+ else
+ if ((fp = CVS_FOPEN (fn, "w+")) == NULL)
+ {
+ free (fn);
+ fn = NULL;
+ }
/* tempnam returns a pointer to a newly malloc'd string, so there's
* no need for a xstrdup
- [Cvs-cvs] Changes to ccvs/windows-NT/filesubr.c,
Conrad T . Pino <=