Daniel Stenberg <daniel_at_haxx.se> writes:
>> BTW, related to portability (but a trifling issue), I would propose
>> eliminating "negative exit codes" in example/*.c.
>
> I just browsed through a few just now, but don't most of them return 0
> from main() ?
No, actually all the examples except ssh2_agent.c may return -1 on
failure. For example:
if (connect(sock, (struct sockaddr*)(&sin),
sizeof(struct sockaddr_in)) != 0) {
fprintf(stderr, "failed to connect!\n");
return -1;
}
in main() of ssh2.c.
Regards,
-- Daiki Ueno _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2010-01-06