gethostbyname call with 0 length arg

Detlef Riekenberg wine.dev at web.de
Wed Feb 8 05:58:18 CST 2006


Am Samstag, den 04.02.2006, 00:59 +0100 schrieb Phil Goss:
> This is what seems to have worked for me
> 
> if(!name || !strlen(name)) {

strlen() is overkill here, because you do not need the real length of
the string.

So "!name[0]" (or "!*name") instead of "!strlen(name)" is more
efficient, when you want to check for an empty name.


-- 
By By ...
      ... Detlef




More information about the wine-devel mailing list