> Yes, || short-circuits.  If h is 0, you don't do the rest of the
> test, so you don't dereference h.

True, I'm lame.

> gethostbyname does the right thing: it simply converts dotted-quad
> strings into IP addresses (i.e "1.2.3.4" gets mapped to 1.2.3.4,
> without a resolver call).

It is a speed thing, gethostbyname can be expensive, by checking if it is
even necessary you save a potential lookup.

-- 
Anduin Withers

_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to