Argh! Why take a perfectly good struct in_addr, take one of its members, and cast a pointer to that member back to a pointer to the structure type? Why in the world not just if (inet_aton(s, &sin->sin_addr) == 0) That's what I did when I applied the change. Chill.