summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-01-10 12:33:39 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-01-10 12:33:39 -0800
commitbf8f5100eaf348023cfa04f540bba2fa3cf738a4 (patch)
treeaa3582a67b8701bfc975f7bc1f30d4939f6d3f38
parentb83af9a85c36d77110d66f60afdcdd41d17d3fae (diff)
downloadtxr-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib.c b/lib.c
index aac7d146..79991ae2 100644
--- a/lib.c
+++ b/lib.c
@@ -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 {