summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-11-30 13:32:53 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-11-30 13:32:53 +0900
commitac9fdb7a50946a2b2013eefd0cb137428715ccc0 (patch)
tree1e99ad597552e7d58c91d4b35da5e25f3df771e0 /ext/socket
parent5baa2b96509118710cd1b425457f11ad574168ee (diff)
Adjust indent [ci skip]
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/init.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/ext/socket/init.c b/ext/socket/init.c
index dc9bd5acc8..15b639f400 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -418,7 +418,7 @@ rsock_write_nonblock(VALUE sock, VALUE str, VALUE ex)
if (e == EWOULDBLOCK || e == EAGAIN) {
if (ex == Qfalse) return sym_wait_writable;
rb_readwrite_syserr_fail(RB_IO_WAIT_WRITABLE, e,
- "write would block");
+ "write would block");
}
rb_syserr_fail_path(e, fptr->pathv);
}
@@ -459,9 +459,9 @@ rsock_socket(int domain, int type, int proto)
fd = rsock_socket0(domain, type, proto);
if (fd < 0) {
- if (rb_gc_for_fd(errno)) {
- fd = rsock_socket0(domain, type, proto);
- }
+ if (rb_gc_for_fd(errno)) {
+ fd = rsock_socket0(domain, type, proto);
+ }
}
if (0 <= fd)
rb_update_max_fd(fd);
@@ -518,10 +518,10 @@ wait_connectable(int fd, struct timeval *timeout)
switch (sockerr) {
case 0:
- /*
- * be defensive in case some platforms set SO_ERROR on the original,
- * interrupted connect()
- */
+ /*
+ * be defensive in case some platforms set SO_ERROR on the original,
+ * interrupted connect()
+ */
/* when the connection timed out, no errno is set and revents is 0. */
if (timeout && revents == 0) {
@@ -707,9 +707,9 @@ rsock_s_accept(VALUE klass, VALUE io, struct sockaddr *sockaddr, socklen_t *len)
RB_IO_POINTER(io, fptr);
struct accept_arg accept_arg = {
- .fd = fptr->fd,
- .sockaddr = sockaddr,
- .len = len
+ .fd = fptr->fd,
+ .sockaddr = sockaddr,
+ .len = len
};
int retry = 0, peer;
@@ -756,10 +756,10 @@ rsock_getfamily(rb_io_t *fptr)
if (cached) {
switch (cached) {
#ifdef AF_UNIX
- case FMODE_UNIX: return AF_UNIX;
+ case FMODE_UNIX: return AF_UNIX;
#endif
- case FMODE_INET: return AF_INET;
- case FMODE_INET6: return AF_INET6;
+ case FMODE_INET: return AF_INET;
+ case FMODE_INET6: return AF_INET6;
}
}
@@ -781,7 +781,7 @@ rsock_getfamily(rb_io_t *fptr)
static VALUE
sock_resolv_error_code(VALUE self)
{
- return rb_attr_get(self, id_error_code);
+ return rb_attr_get(self, id_error_code);
}
void