Commit a1b71b64 authored by ken-mu's avatar ken-mu

mruby-time: remove ifdef for mktime error handling

parent 6a2c0c6e
...@@ -384,11 +384,9 @@ time_mktime(mrb_state *mrb, mrb_int ayear, mrb_int amonth, mrb_int aday, ...@@ -384,11 +384,9 @@ time_mktime(mrb_state *mrb, mrb_int ayear, mrb_int amonth, mrb_int aday,
else { else {
nowsecs = mktime(&nowtime); nowsecs = mktime(&nowtime);
} }
#ifndef MRB_TIME_T_UINT
if (nowsecs == (time_t)-1) { if (nowsecs == (time_t)-1) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "Not a valid time."); mrb_raise(mrb, E_ARGUMENT_ERROR, "Not a valid time.");
} }
#endif
return time_alloc(mrb, (double)nowsecs, (double)ausec, timezone); return time_alloc(mrb, (double)nowsecs, (double)ausec, timezone);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment