summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortakano32 <takano32@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-12 08:05:16 +0000
committertakano32 <takano32@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-12 08:05:16 +0000
commit976a3041ef38711b84c6a35db25f189d31903e38 (patch)
tree5adca7b1b11e69a300821785064f931a90f8dfc3
parent8f73480c3d9b1497b6ddebdf92b79b480d365670 (diff)
* date_core.c: clearly specify operator precedence.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--ext/date/date_core.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e9e4e19d2b..5cf3488807 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Mar 12 17:02:53 2013 TAKANO Mitsuhiro <tak@no32.tk>
+
+ * date_core.c: clearly specify operator precedence.
+
Tue Mar 12 17:00:45 2013 TAKANO Mitsuhiro <tak@no32.tk>
* insns.def: fix condition.
diff --git a/ext/date/date_core.c b/ext/date/date_core.c
index f898c46aa2..323a4550b2 100644
--- a/ext/date/date_core.c
+++ b/ext/date/date_core.c
@@ -679,7 +679,7 @@ c_julian_leap_p(int y)
inline static int
c_gregorian_leap_p(int y)
{
- return MOD(y, 4) == 0 && y % 100 != 0 || MOD(y, 400) == 0;
+ return (MOD(y, 4) == 0 && y % 100 != 0) || MOD(y, 400) == 0;
}
static int