diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-06-13 07:29:19 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-06-13 07:29:19 -0700 |
commit | f9cd0b3815083f3827cd00b15e1ccf9a8706ad3c (patch) | |
tree | d945347f1b3cf8fdfb0174f74354a04b3126a5c6 /lib.c | |
parent | 9a275d84effb81f25f409d9bcb95726173018b68 (diff) | |
download | txr-f9cd0b3815083f3827cd00b15e1ccf9a8706ad3c.tar.gz txr-f9cd0b3815083f3827cd00b15e1ccf9a8706ad3c.tar.bz2 txr-f9cd0b3815083f3827cd00b15e1ccf9a8706ad3c.zip |
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.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |