summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-02-13 13:43:35 +0000
committerNick Mathewson <nickm@torproject.org>2009-02-13 13:43:35 +0000
commit73094d595208ff45ec44d8d399b1811472156b8f (patch)
tree2381ea9e08fa0ec059997ade6fd5a97525d0e6fc /test
parent79b7799bd1a2023864e1f2124444692a289ff72b (diff)
downloadlibevent-73094d595208ff45ec44d8d399b1811472156b8f.tar.gz
Make tmpfile code compile without warnings
svn:r1123
Diffstat (limited to 'test')
-rw-r--r--test/regress_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/regress_main.c b/test/regress_main.c
index e7939bd9..ad337427 100644
--- a/test/regress_main.c
+++ b/test/regress_main.c
@@ -95,8 +95,9 @@ regress_make_tmpfile(const void *data, size_t datalen)
{
#ifndef WIN32
char tmpfilename[32];
+ int fd;
strcpy(tmpfilename, "/tmp/eventtmp.XXXX");
- int fd = mkstemp(tmpfilename);
+ fd = mkstemp(tmpfilename);
if (fd == -1)
return (-1);
if (write(fd, data, datalen) != datalen) {