From f9cd0b3815083f3827cd00b15e1ccf9a8706ad3c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 13 Jun 2019 07:29:19 -0700 Subject: replace-str, replace-vec: remove call to len. * lib.c (replace_str, replace_vec): Remove redundant calculation of input sequence length; there is a len variable bound on entry into the function. --- lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib.c') diff --git a/lib.c b/lib.c index 70dba1cc..385101cb 100644 --- a/lib.c +++ b/lib.c @@ -3764,7 +3764,7 @@ val replace_str(val str_in, val items, val from, val to) } else if (from == t) { from = len; } else if (!integerp(from)) { - val len = length_str(str_in), wh, item; + val wh, item; seq_iter_t wh_iter, item_iter; seq_iter_init(self, &item_iter, items); seq_iter_init(self, &wh_iter, from); @@ -7174,7 +7174,7 @@ val replace_vec(val vec_in, val items, val from, val to) from = len; } else if (!integerp(from)) { seq_iter_t wh_iter, item_iter; - val len = length_vec(vec_in), wh, item; + val wh, item; seq_iter_init(self, &wh_iter, from); seq_iter_init(self, &item_iter, items); -- cgit v1.2.3