diff options
author | Roger Dingledine <arma@torproject.org> | 2005-07-18 23:16:09 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-07-18 23:16:09 +0000 |
commit | bb97d7f4ea9e18e33831e1d4e4ae6cb565c216da (patch) | |
tree | 900e8a3267fa7bb2a7cb84cc7b0c3cfca33d77a8 /src/common/container.c | |
parent | 893652da84e5a54b10c48d1962b9e7902f794503 (diff) | |
download | tor-bb97d7f4ea9e18e33831e1d4e4ae6cb565c216da.tar.gz tor-bb97d7f4ea9e18e33831e1d4e4ae6cb565c216da.zip |
slightly cleaner fix
svn:r4599
Diffstat (limited to 'src/common/container.c')
-rw-r--r-- | src/common/container.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/container.c b/src/common/container.c index 01080612c9..3ddca27f26 100644 --- a/src/common/container.c +++ b/src/common/container.c @@ -370,13 +370,12 @@ char *smartlist_join_strings2(smartlist_t *sl, const char *join, for (i = 0; i < sl->num_used; ) { for (src = sl->list[i]; *src; ) *dst++ = *src++; - if (++i < sl->num_used || terminate) { + if (++i < sl->num_used) { memcpy(dst, join, join_len); dst += join_len; } } - if (sl->num_used == 0 && terminate) { - /* another special case for length == 0 */ + if (terminate) { memcpy(dst, join, join_len); dst += join_len; } |