cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Patch to send arbitrary SFTP commands

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 2 Apr 2007 23:16:50 +0200 (CEST)

On Mon, 2 Apr 2007, Nick Zitzmann wrote:

> About the following code:
>
> while (item) {
> if (item->data) {
> char *path1 = NULL;
> char *path2 = NULL;
>
> Is that acceptable? I didn't think code like that would compile under GCC
> 2.95 and older compilers. I never saw anything like that elsewhere in the
> CURL code, but maybe I didn't look hard enough...

Yes, that is perfectly fine (K&R and ANSI) C code and works even with very old
and very pedantic compilers.

> I corrected a crash bug in parameter parsing (if a parameter was missing
> then the program crashed instead of returning an error). See corrected patch
> attached. Other than that, I tested all commands and they all worked as
> expected.

Great, thanks for your work. It has now been committed!

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-04-02