mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-23 14:40:51 +01:00
slightly cleaner fix
svn:r4599
This commit is contained in:
parent
893652da84
commit
bb97d7f4ea
1 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue