]> granicus.if.org Git - libevent/commitdiff
Make tmpfile code compile without warnings
authorNick Mathewson <nickm@torproject.org>
Fri, 13 Feb 2009 13:43:35 +0000 (13:43 +0000)
committerNick Mathewson <nickm@torproject.org>
Fri, 13 Feb 2009 13:43:35 +0000 (13:43 +0000)
svn:r1123

test/regress_main.c

index e7939bd9f7530f516b118f4c8a69b78514728e52..ad3374274ea8e388d9b6008c7ae7a94473580b1b 100644 (file)
@@ -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) {