mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vtm_add_offset: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor.
This commit is contained in:
parent
0fc569361b
commit
1c0a97bfad
Notes:
git
2020-06-29 11:06:41 +09:00
1 changed files with 0 additions and 2 deletions
2
time.c
2
time.c
|
@ -1967,10 +1967,8 @@ vtm_add_offset(struct vtm *vtm, VALUE off, int sign)
|
|||
vtm->subsecx = subv(vtm->subsecx, INT2FIX(TIME_SCALE));
|
||||
sec += 1;
|
||||
}
|
||||
goto not_zero_sec;
|
||||
}
|
||||
if (sec) {
|
||||
not_zero_sec:
|
||||
/* If sec + subsec == 0, don't change vtm->sec.
|
||||
* It may be 60 which is a leap second. */
|
||||
sec += vtm->sec;
|
||||
|
|
Loading…
Add table
Reference in a new issue