Skip to content

Commit 0d842fe

Browse files
committed
* expand tabs. [ci skip]
Tabs were expanded because the file did not have any tab indentation in unedited lines. Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook.
1 parent c258fb2 commit 0d842fe

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

ext/io/nonblock/nonblock.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ rb_io_nonblock_p(VALUE io)
4242
rb_io_t *fptr;
4343
GetOpenFile(io, fptr);
4444
if (get_fcntl_flags(fptr->fd) & O_NONBLOCK)
45-
return Qtrue;
45+
return Qtrue;
4646
return Qfalse;
4747
}
4848
#else
@@ -54,21 +54,21 @@ static void
5454
set_fcntl_flags(int fd, int f)
5555
{
5656
if (fcntl(fd, F_SETFL, f) == -1)
57-
rb_sys_fail(0);
57+
rb_sys_fail(0);
5858
}
5959

6060
static int
6161
io_nonblock_set(int fd, int f, int nb)
6262
{
6363
if (nb) {
64-
if ((f & O_NONBLOCK) != 0)
65-
return 0;
66-
f |= O_NONBLOCK;
64+
if ((f & O_NONBLOCK) != 0)
65+
return 0;
66+
f |= O_NONBLOCK;
6767
}
6868
else {
69-
if ((f & O_NONBLOCK) == 0)
70-
return 0;
71-
f &= ~O_NONBLOCK;
69+
if ((f & O_NONBLOCK) == 0)
70+
return 0;
71+
f &= ~O_NONBLOCK;
7272
}
7373
set_fcntl_flags(fd, f);
7474
return 1;
@@ -127,9 +127,9 @@ rb_io_nonblock_set(VALUE io, VALUE nb)
127127
rb_io_t *fptr;
128128
GetOpenFile(io, fptr);
129129
if (RTEST(nb))
130-
rb_io_set_nonblock(fptr);
130+
rb_io_set_nonblock(fptr);
131131
else
132-
io_nonblock_set(fptr->fd, get_fcntl_flags(fptr->fd), RTEST(nb));
132+
io_nonblock_set(fptr->fd, get_fcntl_flags(fptr->fd), RTEST(nb));
133133
return io;
134134
}
135135

@@ -160,15 +160,15 @@ rb_io_nonblock_block(int argc, VALUE *argv, VALUE io)
160160

161161
GetOpenFile(io, fptr);
162162
if (argc > 0) {
163-
VALUE v;
164-
rb_scan_args(argc, argv, "01", &v);
165-
nb = RTEST(v);
163+
VALUE v;
164+
rb_scan_args(argc, argv, "01", &v);
165+
nb = RTEST(v);
166166
}
167167
f = get_fcntl_flags(fptr->fd);
168168
restore[0] = fptr->fd;
169169
restore[1] = f;
170170
if (!io_nonblock_set(fptr->fd, f, nb))
171-
return rb_yield(io);
171+
return rb_yield(io);
172172
return rb_ensure(rb_yield, io, io_nonblock_restore, (VALUE)restore);
173173
}
174174
#else

0 commit comments

Comments
 (0)