On Thu, 2013-06-27 at 16:32 +0100, Ben Hutchings wrote: > The return values for this are awful. I think the return value should > be 0 for success or -EINVAL on error. > > The caller can then check addr->sa.sa_family if they want to know the > address family immediately.