- if (host == NULL) return(-1);
- if (strlen(host) == 0) return(-1);
- if (service == NULL) return(-1);
- if (strlen(service) == 0) return(-1);
- if (protocol == NULL) return(-1);
- if (strlen(protocol) == 0) return(-1);
+ if ((host == NULL) || IsEmptyStr(host))
+ return(-1);
+ if ((service == NULL) || IsEmptyStr(service))
+ return(-1);
+ if ((protocol == NULL) || IsEmptyStr(protocol))
+ return(-1);