mruby-time: combine variable declaration with initialization

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-10-23 13:55:47 +09:00
parent d4d2955c6b
commit 8c4bf04856
+1 -2
View File
@@ -902,8 +902,7 @@ time_minus(mrb_state *mrb, mrb_value self)
+ (mrb_float)(tm->nsec - tm2->nsec) / 1.0e9;
return mrb_float_value(mrb, f);
#else
mrb_int f;
f = tm->sec - tm2->sec;
mrb_int f = tm->sec - tm2->sec;
if (tm->nsec < tm2->nsec) f--;
return mrb_int_value(mrb, f);
#endif