Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adjust style.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
commit f4d2374b45bf893b5adf34470e9f20d55143c5ac 1 parent 07d9c29
Nobuyoshi Nakada nobu authored
Showing with 42 additions and 22 deletions.
  1. +13 −7 io.c
  2. +20 −10 process.c
  3. +2 −1  sparc.c
  4. +7 −4 thread.c
20 io.c
View
@@ -1351,7 +1351,8 @@ rb_io_addstr(VALUE io, VALUE str)
}
#ifdef HAVE_FSYNC
-static VALUE nogvl_fsync(void *ptr)
+static VALUE
+nogvl_fsync(void *ptr)
{
rb_io_t *fptr = ptr;
@@ -1722,14 +1723,17 @@ rb_io_fsync(VALUE io)
#else
# define rb_io_fsync rb_f_notimplement
# define rb_io_sync rb_f_notimplement
-static VALUE rb_io_set_sync(VALUE io, VALUE sync) {
- rb_notimplement();
- /* NEVER REACHED */ return Qundef;
+static VALUE
+rb_io_set_sync(VALUE io, VALUE sync)
+{
+ rb_notimplement();
+ UNREACHABLE;
}
#endif
#ifdef HAVE_FDATASYNC
-static VALUE nogvl_fdatasync(void *ptr)
+static VALUE
+nogvl_fdatasync(void *ptr)
{
rb_io_t *fptr = ptr;
@@ -8224,7 +8228,8 @@ struct ioctl_arg {
long narg;
};
-static VALUE nogvl_ioctl(void *ptr)
+static VALUE
+nogvl_ioctl(void *ptr)
{
struct ioctl_arg *arg = ptr;
@@ -8521,7 +8526,8 @@ struct fcntl_arg {
long narg;
};
-static VALUE nogvl_fcntl(void *ptr)
+static VALUE
+nogvl_fcntl(void *ptr)
{
struct fcntl_arg *arg = ptr;
30 process.c
View
@@ -991,13 +991,15 @@ static RETSIGTYPE (*saved_sigpipe_handler)(int) = 0;
#endif
#ifdef SIGPIPE
-static RETSIGTYPE sig_do_nothing(int sig)
+static RETSIGTYPE
+sig_do_nothing(int sig)
{
}
#endif
/* This function should be async-signal-safe. Actually it is. */
-static void before_exec_async_signal_safe(void)
+static void
+before_exec_async_signal_safe(void)
{
#ifdef SIGPIPE
/*
@@ -1010,7 +1012,8 @@ static void before_exec_async_signal_safe(void)
#endif
}
-static void before_exec_non_async_signal_safe(void)
+static void
+before_exec_non_async_signal_safe(void)
{
if (!forked_child) {
/*
@@ -1022,21 +1025,24 @@ static void before_exec_non_async_signal_safe(void)
}
}
-static void before_exec(void)
+static void
+before_exec(void)
{
before_exec_non_async_signal_safe();
before_exec_async_signal_safe();
}
/* This function should be async-signal-safe. Actually it is. */
-static void after_exec_async_signal_safe(void)
+static void
+after_exec_async_signal_safe(void)
{
#ifdef SIGPIPE
signal(SIGPIPE, saved_sigpipe_handler); /* async-signal-safe */
#endif
}
-static void after_exec_non_async_signal_safe(void)
+static void
+after_exec_non_async_signal_safe(void)
{
rb_thread_reset_timer_thread();
rb_thread_start_timer_thread();
@@ -1044,7 +1050,8 @@ static void after_exec_non_async_signal_safe(void)
forked_child = 0;
}
-static void after_exec(void)
+static void
+after_exec(void)
{
after_exec_async_signal_safe();
after_exec_non_async_signal_safe();
@@ -2099,7 +2106,8 @@ rb_execarg_new(int argc, VALUE *argv, int accept_shell)
return execarg_obj;
}
-struct rb_execarg *rb_execarg_get(VALUE execarg_obj)
+struct rb_execarg
+*rb_execarg_get(VALUE execarg_obj)
{
struct rb_execarg *eargp;
TypedData_Get_Struct(execarg_obj, struct rb_execarg, &exec_arg_data_type, eargp);
@@ -5305,7 +5313,8 @@ proc_setgid(VALUE obj, VALUE id)
*/
#define RB_MAX_GROUPS (65536)
static int _maxgroups = -1;
-static int get_sc_ngroups_max(void)
+static int
+get_sc_ngroups_max(void)
{
#ifdef _SC_NGROUPS_MAX
return (int)sysconf(_SC_NGROUPS_MAX);
@@ -5315,7 +5324,8 @@ static int get_sc_ngroups_max(void)
return -1;
#endif
}
-static int maxgroups(void)
+static int
+maxgroups(void)
{
if (_maxgroups < 0) {
_maxgroups = get_sc_ngroups_max();
3  sparc.c
View
@@ -9,7 +9,8 @@
See http://bugs.ruby-lang.org/issues/5244 for discussion.
*********************************************************************/
-void rb_sparc_flush_register_windows(void)
+void
+rb_sparc_flush_register_windows(void)
{
asm
#ifdef __GNUC__
11 thread.c
View
@@ -2725,8 +2725,9 @@ rb_thread_fd_select(int max, rb_fdset_t * read, rb_fdset_t * write, rb_fdset_t *
#ifndef HAVE_PPOLL
/* TODO: don't ignore sigmask */
-int ppoll(struct pollfd *fds, nfds_t nfds,
- const struct timespec *ts, const sigset_t *sigmask)
+int
+ppoll(struct pollfd *fds, nfds_t nfds,
+ const struct timespec *ts, const sigset_t *sigmask)
{
int timeout_ms;
@@ -2743,7 +2744,8 @@ int ppoll(struct pollfd *fds, nfds_t nfds,
else
timeout_ms = tmp + tmp2;
}
- } else
+ }
+ else
timeout_ms = -1;
return poll(fds, nfds, timeout_ms);
@@ -2822,7 +2824,8 @@ rb_wait_for_single_fd(int fd, int events, struct timeval *tv)
return result;
}
#else /* ! USE_POLL - implement rb_io_poll_fd() using select() */
-static rb_fdset_t *init_set_fd(int fd, rb_fdset_t *fds)
+static rb_fdset_t *
+init_set_fd(int fd, rb_fdset_t *fds)
{
rb_fd_init(fds);
rb_fd_set(fd, fds);
Please sign in to comment.
Something went wrong with that request. Please try again.