We shouldn't pass the struct hostent returned from gethostbyname as