about summary refs log tree commit diff
path: root/Src/Modules/zftp.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2004-10-21 00:33:50 +0000
committerWayne Davison <wayned@users.sourceforge.net>2004-10-21 00:33:50 +0000
commit3ccc3e4bdcaed42c72e6b22c1306518458778541 (patch)
treea420f6a525ed82316b35f9d349c1736d6073251e /Src/Modules/zftp.c
parent65729f55704b22dbe781bd826a852bfe48b3e8e1 (diff)
downloadzsh-3ccc3e4bdcaed42c72e6b22c1306518458778541.tar.gz
zsh-3ccc3e4bdcaed42c72e6b22c1306518458778541.tar.xz
zsh-3ccc3e4bdcaed42c72e6b22c1306518458778541.zip
Use the new gettempfile() function.
Diffstat (limited to 'Src/Modules/zftp.c')
-rw-r--r--Src/Modules/zftp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c
index 621e0cf0d..3fb01486a 100644
--- a/Src/Modules/zftp.c
+++ b/Src/Modules/zftp.c
@@ -1971,8 +1971,7 @@ zftp_open(char *name, char **args, int flags)
      * However, it is closed whenever there are no connections open.
      */
     if (zfstatfd == -1) {
-	fname = gettempname(NULL, 1);
-	zfstatfd = open(fname, O_RDWR|O_CREAT|O_EXCL, 0600);
+	zfstatfd = gettempfile(NULL, 1, &fname);
 	DPUTS(zfstatfd == -1, "zfstatfd not created");
 #if defined(F_SETFD) && defined(FD_CLOEXEC)
 	/* If the shell execs a program, we don't want this fd left open. */