Lines Matching defs:pattern
527 static int match_host_pattern(const char *pattern, const char *hostname)
530 if (!strcmp(pattern, "*"))
532 // Skip a possible *. at the start of the pattern
533 if (pattern[0] == '*')
534 pattern++;
535 if (pattern[0] == '.')
536 pattern++;
537 len_p = strlen(pattern);
541 // Simply check if the end of hostname is equal to 'pattern'
542 if (!strcmp(pattern, &hostname[len_h - len_p])) {