From e358888d5e22344429ee7d5589b5053e0a817afd Mon Sep 17 00:00:00 2001 From: tadf Date: Fri, 25 Mar 2011 13:01:06 +0000 Subject: * ext/date/date_core.c: should not force cast with macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/date/date_strftime.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ext/date/date_strftime.c') diff --git a/ext/date/date_strftime.c b/ext/date/date_strftime.c index f30f6103ca..774d8acb8b 100644 --- a/ext/date/date_strftime.c +++ b/ext/date/date_strftime.c @@ -487,13 +487,14 @@ date_strftime_wo_timespec(char *s, size_t maxsize, const char *format, case 'z': /* time zone offset east of GMT e.g. -0600 */ SKIP_MODIFIER_EO; { - int aoff, hl, hw; + long aoff; + int hl, hw; off = NUM2LONG(rb_funcall(vtm->utc_offset, rb_intern("round"), 0)); - aoff = (int)off; + aoff = off; if (aoff < 0) - aoff = (int)-off; + aoff = -off; if ((aoff / 3600) < 10) hl = 1; -- cgit v1.2.3