diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-06-19 12:39:16 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-06-29 11:05:41 +0900 |
commit | 1c0a97bfad9943d796ef9ba5e28c967397a80b77 (patch) | |
tree | 6bf65e47ca7989939f9b533039b7b971550f5eed /time.c | |
parent | 0fc569361bfef9a48a6ad54b075047f02b51b4e2 (diff) | |
download | ruby-1c0a97bfad9943d796ef9ba5e28c967397a80b77.tar.gz |
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.
Diffstat (limited to 'time.c')
-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; |