From 69981b5348b5e1e42caa1b848151a3334049b570 Mon Sep 17 00:00:00 2001 From: ocean Date: Thu, 5 Jan 2006 05:29:48 +0000 Subject: ANSI styled git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- missing/flock.c | 12 +++--------- missing/isinf.c | 15 ++++++--------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/missing/flock.c b/missing/flock.c index ed619f0e91..7a5a58aaa7 100644 --- a/missing/flock.c +++ b/missing/flock.c @@ -23,9 +23,7 @@ #include int -flock(fd, operation) - int fd; - int operation; +flock(int fd, int operation) { struct flock lock; @@ -90,9 +88,7 @@ flock(fd, operation) # endif int -flock(fd, operation) - int fd; - int operation; +flock(int fd, int operation) { switch (operation) { @@ -124,9 +120,7 @@ flock(fd, operation) } #elif !defined _WIN32 int -flock(fd, operation) - int fd; - int operation; +flock(int fd, int operation) { rb_notimplement(); return -1; diff --git a/missing/isinf.c b/missing/isinf.c index e44ef6c3c1..27271bdec2 100644 --- a/missing/isinf.c +++ b/missing/isinf.c @@ -6,8 +6,7 @@ #include int -isinf(n) - double n; +isinf(double n) { if (IsNANorINF(n) && IsINF(n)) { return 1; @@ -29,8 +28,7 @@ isinf(n) #endif int -isinf(n) - double n; +isinf(double n) { return (!finite(n) && !isnan(n)); } @@ -43,13 +41,12 @@ isinf(n) # include #endif -static double zero() { return 0.0; } -static double one() { return 1.0; } -static double inf() { return one() / zero(); } +static double zero(void) { return 0.0; } +static double one (void) { return 1.0; } +static double inf (void) { return one() / zero(); } int -isinf(n) - double n; +isinf(double n) { static double pinf = 0.0; static double ninf = 0.0; -- cgit v1.2.3