Richard W.M. Jones wrote:
On Thu, Nov 26, 2009 at 02:57:04PM +0100, Jim Meyering wrote:
> Richard W.M. Jones wrote:
> > + if (winsock_init () == -1) {
> > + fprintf (stderr, "winsock initialization failed\n");
>
> It would be nice to include strerror info.
> (as long as you're using gnulib's error module, might as well use it;
> added advantage: this diagnostic is now inconsistent with all others
> in that it prints the customary "program_name: " prefix)
>
> error (0, 0, "winsock initialization failed");
OK, I'll make this change when I push it.
Actually, first parameter will be EXIT_FAILURE ...
Sounds good.
I would have suggested that, but kept with the existing code's
style of returning -1 rather than looking at the caller.