diff options
author | 卜部昌平 <[email protected]> | 2020-06-19 12:39:16 +0900 |
---|---|---|
committer | 卜部昌平 <[email protected]> | 2020-06-29 11:05:41 +0900 |
commit | 1c0a97bfad9943d796ef9ba5e28c967397a80b77 (patch) | |
tree | 6bf65e47ca7989939f9b533039b7b971550f5eed | |
parent | 0fc569361bfef9a48a6ad54b075047f02b51b4e2 (diff) |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
-rw-r--r-- | time.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -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; |