summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-03-25 06:47:47 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-03-25 06:47:47 -0700
commita60184d1f703bf0784ef6381c08cc16299c2a962 (patch)
treed308cd16a99fddef611117995f3f2c920f1b63f5
parent8bb4c4c290c6c457426faa4ecf4c897d0f3a2a88 (diff)
downloadtxr-a60184d1f703bf0784ef6381c08cc16299c2a962.tar.gz
txr-a60184d1f703bf0784ef6381c08cc16299c2a962.tar.bz2
txr-a60184d1f703bf0784ef6381c08cc16299c2a962.zip
plus: missing breaks.
* arith.c (plus): Add missing break statements to two switch cases. One is at the end, where it is not strictly necessary. The other omission is harmless also and may have been deliberate, though not commented by a /* fallthrough */. The other functions with this same pattern, namely minus, has the breaks.
-rw-r--r--arith.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arith.c b/arith.c
index 05814e37..28e61242 100644
--- a/arith.c
+++ b/arith.c
@@ -604,9 +604,11 @@ tail:
case TAG_PAIR(TAG_CHR, TAG_PTR):
if (type(bnum) == RNG)
return rcons(plus(anum, from(bnum)), plus(anum, to(bnum)));
+ break;
case TAG_PAIR(TAG_PTR, TAG_CHR):
if (type(anum) == RNG)
return rcons(plus(from(anum), bnum), plus(to(anum), bnum));
+ break;
}
invalid_ops(self, anum, bnum);
char_range: