diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-01-10 12:33:39 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-01-10 12:33:39 -0800 |
commit | bf8f5100eaf348023cfa04f540bba2fa3cf738a4 (patch) | |
tree | aa3582a67b8701bfc975f7bc1f30d4939f6d3f38 | |
parent | b83af9a85c36d77110d66f60afdcdd41d17d3fae (diff) | |
download | txr-bf8f5100eaf348023cfa04f540bba2fa3cf738a4.tar.gz txr-bf8f5100eaf348023cfa04f540bba2fa3cf738a4.tar.bz2 txr-bf8f5100eaf348023cfa04f540bba2fa3cf738a4.zip |
Reduce scope of variable in cat_str.
* lib.c (cat_str): Unnecessarily scoped len variable
moves to inner scope.
-rw-r--r-- | lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3395,11 +3395,11 @@ val cat_str(val list, val sep) for (ptr = str, iter = list; iter != nil; iter = cdr(iter)) { val item = car(iter); - cnum len; + if (!item) continue; if (stringp(item)) { - len = c_num(length_str(item)); + cnum len = c_num(length_str(item)); wmemcpy(ptr, c_str(item), len); ptr += len; } else { |