On Sunday, October 07, 2001, Mike Barcroft wrote:
>                               for (i = 0; ip_whois[i] != NULL; i++) {
> -                                     if (strstr(buf, ip_whois[i]) == NULL)
> +                                     if (strnstr(buf, ip_whois[i], len) ==
> +                                         NULL)
>                                               continue;
>                                       s_asprintf(&nhost, "%s", ip_whois[i]);
> +                                     break;

   Should be

        for (i = 0; ip_whois[i] != NULL; i++) {
                if (strnstr(buf, ip_whois[i]) != NULL) {
                        s_asprintf(&nhost, "%s", ip_whois[i]);
                        break;
                }
        }

   for simplicity's sake.

-- 
+-------------------+------------------------------------------+
| Chris Costello    | To iterate is human; to recurse, divine. |
| [EMAIL PROTECTED] |                                          |
+-------------------+------------------------------------------+

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to