On 26 Dec 2011, at 17:00, Armel Asselin wrote:

> diff --git a/lib/ssh.c b/lib/ssh.c
> index 23ba5f4..daa66e1 100644
> --- a/lib/ssh.c
> +++ b/lib/ssh.c
> @@ -1900,6 +1900,7 @@ static CURLcode ssh_statemach_act(struct connectdata 
> *conn, bool *block)
>        break;
>      }
>      sshc->readdir_line = new_readdir_line;
> +      sshc->readdir_totalLen += 4 + sshc->readdir_len;
> 
>      sshc->readdir_currLen += snprintf(sshc->readdir_line +
>                                        sshc->readdir_currLen,

If this is the same ‘4’ as on line 1889:
      new_readdir_line = realloc(sshc->readdir_line,
                                 sshc->readdir_totalLen + 4 +
                                 sshc->readdir_len);

then would it make sense to assign this number once and then use the constant 
for both cases? It's more clear, I think.

-- 
Tim Bannister – [email protected]


-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to