Commit 4b81bce4 authored by Uchio Kondo's avatar Uchio Kondo Committed by Hiroshi Mimaki

Follow C90 style

parent 3486675e
......@@ -99,16 +99,6 @@ sock_test_out:
static mrb_value
mrb_io_test_io_setup(mrb_state *mrb, mrb_value self)
{
if(!(socket_available_p = mrb_io_socket_abailable())) {
char *tmpdir;
wd_save = open(".", O_DIRECTORY);
tmpdir = getenv("TMPDIR");
if (tmpdir)
assert(!chdir(tmpdir));
else
assert(!chdir("/tmp"));
}
char rfname[] = "tmp.mruby-io-test-r.XXXXXXXX";
char wfname[] = "tmp.mruby-io-test-w.XXXXXXXX";
char symlinkname[] = "tmp.mruby-io-test-l.XXXXXXXX";
......@@ -123,6 +113,16 @@ mrb_io_test_io_setup(mrb_state *mrb, mrb_value self)
struct sockaddr_un sun0;
#endif
if(!(socket_available_p = mrb_io_socket_abailable())) {
char *tmpdir;
wd_save = open(".", O_DIRECTORY);
tmpdir = getenv("TMPDIR");
if (tmpdir)
assert(!chdir(tmpdir));
else
assert(!chdir("/tmp"));
}
mask = umask(077);
fd0 = mkstemp(rfname);
fd1 = mkstemp(wfname);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment