mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 13:04:23 -04:00
Make tmpfile code compile without warnings
svn:r1123
This commit is contained in:
parent
79b7799bd1
commit
73094d5952
@ -95,8 +95,9 @@ regress_make_tmpfile(const void *data, size_t datalen)
|
|||||||
{
|
{
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
char tmpfilename[32];
|
char tmpfilename[32];
|
||||||
|
int fd;
|
||||||
strcpy(tmpfilename, "/tmp/eventtmp.XXXX");
|
strcpy(tmpfilename, "/tmp/eventtmp.XXXX");
|
||||||
int fd = mkstemp(tmpfilename);
|
fd = mkstemp(tmpfilename);
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
return (-1);
|
return (-1);
|
||||||
if (write(fd, data, datalen) != datalen) {
|
if (write(fd, data, datalen) != datalen) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user