aboutsummaryrefslogtreecommitdiffstats
path: root/mkstemp.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-08-18 19:31:15 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-08-18 19:31:15 +0000
commit994496a18467cfc04e6220e724d9482a48bc42bf (patch)
tree7bbe9c727c44cc6a41cf4511e4e3963289f644ab /mkstemp.c
parente5af0106ac926d26a64713a64f7a176486611189 (diff)
several times replacing:
sprintf -> g_snprintf snprintf -> g_snprintf vsnprintf -> g_vsnprintf strdup -> g_strdup svn path=/trunk/; revision=15412
Diffstat (limited to 'mkstemp.c')
-rw-r--r--mkstemp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mkstemp.c b/mkstemp.c
index bc20510634..a1041e7648 100644
--- a/mkstemp.c
+++ b/mkstemp.c
@@ -41,6 +41,8 @@
#include <process.h> /* For spawning child process */
#endif
+#include <glib.h>
+
#ifndef __set_errno
#define __set_errno(x) errno=(x)
#endif
@@ -65,7 +67,7 @@ mkstemp (template)
return -1;
}
- if (sprintf (&template[len - 5], "%.5u",
+ if (g_snprintf (&template[len - 5], 6, "%.5u",
(unsigned int) getpid () % 100000) != 5)
/* Inconceivable lossage. */
return -1;