Skip to content

Commit bbbdfc4

Browse files
committed
Reverting use of goto as a possible cause of Valgrind errors with clang compiler on Travis
(I'm not able to reproduce it locally) Related to: d07af99
1 parent 919a073 commit bbbdfc4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/core/t-decimal.c

+3-5
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ REBOOL almost_equal(REBDEC a, REBDEC b, REBCNT max_diff) {
356356
goto setDec;
357357

358358
case REB_LOGIC:
359-
if (action != A_MAKE) goto err_make;
359+
if (action != A_MAKE) Trap_Make(type, val);
360360
d1 = VAL_LOGIC(val) ? 1.0 : 0.0;
361361
goto setDec;
362362

@@ -378,7 +378,7 @@ REBOOL almost_equal(REBDEC a, REBDEC b, REBCNT max_diff) {
378378
if (type == REB_PERCENT) break;
379379
goto setDec;
380380
}
381-
goto err_make;
381+
Trap_Make(type, val);;
382382
}
383383

384384
case REB_BINARY:
@@ -414,10 +414,8 @@ REBOOL almost_equal(REBDEC a, REBDEC b, REBCNT max_diff) {
414414
exp--, d1 *= 10.0, Check_Overflow(d1);
415415
while (exp <= -1)
416416
exp++, d1 /= 10.0;
417-
} else {
418-
err_make:
417+
} else
419418
Trap_Make(type, val);
420-
}
421419
}
422420

423421
if (type == REB_PERCENT) d1 /= 100.0;

0 commit comments

Comments
 (0)