[Pkg-wmaker-commits] [wmbiff] 69/84: use mkstemp instead of mktemp to appease the compiler

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 20 03:02:03 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to tag wmbiff_0_4_10
in repository wmbiff.

commit d816b17f58d1bf695a5d945d18af8c6a6e28ae4a
Author: bluehal <bluehal>
Date:   Mon Oct 14 05:52:26 2002 +0000

    use mkstemp instead of mktemp to appease the compiler
---
 wmbiff/maildirClient.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/wmbiff/maildirClient.c b/wmbiff/maildirClient.c
index 83d8771..276310b 100644
--- a/wmbiff/maildirClient.c
+++ b/wmbiff/maildirClient.c
@@ -1,11 +1,11 @@
-/* $Id: maildirClient.c,v 1.11 2002/09/18 23:45:57 bluehal Exp $ */
+/* $Id: maildirClient.c,v 1.12 2002/10/14 05:52:26 bluehal Exp $ */
 /* Author : Yong-iL Joh ( tolkien at mizi.com )
    Modified : Jorge Garc�a ( Jorge.Garcia at uv.es )
    Modified : Dwayne C. Litzenberger ( dlitz at dlitz.net )
  * 
  * Maildir checker.
  *
- * Last Updated : $Date: 2002/09/18 23:45:57 $
+ * Last Updated : $Date: 2002/10/14 05:52:26 $
  *
  */
 
@@ -55,8 +55,6 @@ int maildirCheckHistory(Pop3 pc)
 	struct stat st_cur;
 	struct utimbuf ut;
 	char path_new[256], path_cur[256];
-	char path_newtmp[512];
-	char *fn;
 
 	int count_new = 0, count_cur = 0;
 
@@ -66,13 +64,16 @@ int maildirCheckHistory(Pop3 pc)
 	strcat(path_new, "/new/");
 	strcpy(path_cur, pc->path);
 	strcat(path_cur, "/cur/");
-	strcpy(path_newtmp, path_new);
-	strcat(path_newtmp, ".wmbiff.dircache_flush.XXXXXX");
 
 	if (pc->u.maildir.dircache_flush) {
 		/* hack to clear directory cache for network-mounted maildirs */
-		if ((fn = mktemp(path_newtmp)) != NULL) {
-			unlink(fn);
+		int fd;
+		char path_newtmp[512];
+		strcpy(path_newtmp, path_new);
+		strcat(path_newtmp, ".wmbiff.dircache_flush.XXXXXX");
+		if ((fd = mkstemp(path_newtmp)) >= 0) {
+			close(fd);
+			unlink(path_newtmp);
 		} else {
 			DM(pc, DEBUG_ERROR,
 			   "Can't create dircache flush file '%s': %s\n", path_newtmp,
@@ -171,3 +172,10 @@ int maildirCreate(Pop3 pc, const char *str)
 }
 
 /* vim:set ts=4: */
+/*
+ * Local Variables:
+ * tab-width: 4
+ * c-indent-level: 4
+ * c-basic-offset: 4
+ * End:
+ */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbiff.git



More information about the Pkg-wmaker-commits mailing list