mruby-time: remove ifdef for mktime error handling

This commit is contained in:
ken-mu
2018-01-29 09:43:43 +00:00
parent 6a2c0c6e2a
commit a1b71b64b3
-2
View File
@@ -384,11 +384,9 @@ time_mktime(mrb_state *mrb, mrb_int ayear, mrb_int amonth, mrb_int aday,
else {
nowsecs = mktime(&nowtime);
}
#ifndef MRB_TIME_T_UINT
if (nowsecs == (time_t)-1) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "Not a valid time.");
}
#endif
return time_alloc(mrb, (double)nowsecs, (double)ausec, timezone);
}